@import url("./design-tokens.css");

:root {
  /* Compatibility aliases for the existing workbench. New code uses --ds-* directly. */
  --bg: var(--ds-bg);
  --bg-deep: var(--ds-bg-deep);
  --paper: var(--ds-paper);
  --paper-strong: var(--ds-paper-strong);
  --paper-soft: var(--ds-paper-soft);
  --surface-bright: var(--ds-surface-bright);
  --surface-clean: var(--ds-surface-clean);
  --bg-aqua: var(--ds-bg-aqua);
  --line: var(--ds-line);
  --line-strong: var(--ds-line-strong);
  --ink: var(--ds-ink);
  --ink-strong: var(--ds-ink-strong);
  --muted: var(--ds-muted);
  --muted-bright: var(--ds-muted-bright);
  --brand-blue: var(--ds-brand-blue);
  --cyan: var(--ds-cyan);
  --mint: var(--ds-mint);
  --sky: var(--ds-sky);
  --accent: var(--ds-accent);
  --accent-strong: var(--ds-accent-strong);
  --accent-blue: var(--ds-accent-blue);
  --accent-cyan: var(--ds-accent-cyan);
  --accent-sky: var(--ds-accent-sky);
  --accent-soft: var(--ds-accent-soft);
  --accent-soft-2: var(--ds-accent-soft-2);
  --ok: var(--ds-ok);
  --warn: var(--ds-warn);
  --danger: var(--ds-danger);
  --sidebar: var(--ds-sidebar);
  --sidebar-line: var(--ds-sidebar-line);
  --shadow: var(--ds-shadow-card);
  --shadow-strong: var(--ds-shadow-strong);
  --panel-glow: var(--ds-glow-primary);
  --panel-glow-secondary: var(--ds-glow-secondary);
  --panel-glow-tertiary: var(--ds-glow-tertiary);
  --glass-specular: var(--ds-glass-specular);
  --cursor-x: 50vw;
  --cursor-y: 50vh;
}

/* CRM operator flow: task queue first, reference data second. */
#panel-customers .crm-redesign-shell {
  container-type: inline-size;
  container-name: crm-shell;
}

#panel-customers .crm-inbox-page {
  display: none;
  width: 100%;
  min-width: 0;
}

#panel-customers .crm-redesign-shell[data-crm-view="inbox"] .crm-overview-dashboard,
#panel-customers .crm-redesign-shell[data-crm-view="inbox"] .crm-board {
  display: none;
}

#panel-customers .crm-redesign-shell[data-crm-view="inbox"] .crm-inbox-page {
  display: grid;
  gap: var(--ds-space-5);
}

#panel-customers .crm-redesign-shell:not([data-crm-view="inbox"]) .crm-inbox-page {
  display: none;
}

#panel-customers .crm-view-switch button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: var(--ds-space-1);
  border-radius: var(--ds-radius-pill);
  background: color-mix(in srgb, var(--ds-warn) 16%, transparent);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-overview-dashboard,
#panel-customers .crm-overview-topline,
#panel-customers .crm-work-summary,
#panel-customers .crm-work-queues,
#panel-customers .crm-work-footer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#panel-customers .crm-work-summary {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  flex-wrap: wrap;
  padding: var(--ds-space-4) 0;
  border-block: 1px solid var(--ds-line);
}

#panel-customers .crm-work-summary strong {
  color: var(--ds-ink-strong);
  font-size: clamp(24px, 3cqi, 34px);
}

#panel-customers .crm-work-summary span {
  min-width: 160px;
  margin-right: auto;
  color: var(--ds-muted);
  font-weight: 700;
}

#panel-customers .crm-work-queues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: var(--ds-space-4);
  align-items: start;
}

/* Keep the long "today" lane independent from the shorter queues at medium
   widths, so later queues do not wait for its full height before they appear. */
@container crm-shell (min-width: 936px) and (max-width: 1241px) {
  #panel-customers .crm-work-queues {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }

  #panel-customers .crm-work-queue[data-crm-queue="new"] {
    grid-column: 1;
    grid-row: 1;
  }

  #panel-customers .crm-work-queue[data-crm-queue="today"] {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  #panel-customers .crm-work-queue[data-crm-queue="waiting"] {
    grid-column: 3;
    grid-row: 1;
  }

  #panel-customers .crm-work-queue[data-crm-queue="issues"] {
    grid-column: 3;
    grid-row: 2;
  }
}

@container crm-shell (min-width: 630px) and (max-width: 935px) {
  #panel-customers .crm-work-queues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
  }

  #panel-customers .crm-work-queue[data-crm-queue="new"] {
    grid-column: 1;
    grid-row: 1;
  }

  #panel-customers .crm-work-queue[data-crm-queue="today"] {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  #panel-customers .crm-work-queue[data-crm-queue="waiting"] {
    grid-column: 1;
    grid-row: 2;
  }

  #panel-customers .crm-work-queue[data-crm-queue="issues"] {
    grid-column: 1;
    grid-row: 3;
  }
}

#panel-customers .crm-work-queue {
  display: grid;
  gap: var(--ds-space-3);
  min-width: 0;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-paper-strong);
}

#panel-customers .crm-work-queue-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-3);
  align-items: start;
}

#panel-customers .crm-work-queue-head h3,
#panel-customers .crm-inbox-head h3,
#panel-customers .crm-inbox-section h3 {
  margin: 0;
  color: var(--ds-ink-strong);
}

#panel-customers .crm-work-queue-head p,
#panel-customers .crm-inbox-head p {
  margin: var(--ds-space-1) 0 0;
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
}

#panel-customers .crm-work-queue-head > span {
  display: grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-bg-aqua);
  color: var(--ds-accent-strong);
  font-weight: 900;
}

#panel-customers .crm-work-list {
  display: grid;
  gap: var(--ds-space-2);
}

#panel-customers .crm-work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-3);
  align-items: center;
  min-width: 0;
  padding: var(--ds-space-3);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-surface-clean);
  color: var(--ds-ink);
  text-align: left;
  box-shadow: none;
}

#panel-customers .crm-work-item::after {
  display: none;
}

#panel-customers .crm-work-item:hover,
#panel-customers .crm-work-item.active-card {
  border-color: var(--ds-line-strong);
  background: var(--ds-bg-aqua);
}

#panel-customers .crm-work-item-main,
#panel-customers .crm-work-item-title {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
}

#panel-customers .crm-work-item-main {
  display: grid;
}

#panel-customers .crm-work-item-title {
  flex-wrap: wrap;
}

#panel-customers .crm-work-item-title strong,
#panel-customers .crm-work-item-main b,
#panel-customers .crm-work-item-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

#panel-customers .crm-work-item-title strong {
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-md);
}

#panel-customers .crm-work-item-title mark {
  padding: 3px 7px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-bg-aqua);
  color: var(--ds-accent-strong);
  font-size: var(--ds-text-xs);
  font-weight: 800;
}

#panel-customers .crm-work-item-main small,
#panel-customers .crm-work-item-side {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-work-item-main b {
  font-size: var(--ds-text-sm);
}

#panel-customers .crm-work-item-side {
  white-space: nowrap;
  font-weight: 800;
}

#panel-customers .crm-work-empty {
  padding: var(--ds-space-4);
  border: 1px dashed var(--ds-line-strong);
  border-radius: var(--ds-radius-sm);
  color: var(--ds-muted);
  text-align: center;
}

#panel-customers .crm-work-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  flex-wrap: wrap;
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-line);
  color: var(--ds-muted);
}

#panel-customers .crm-more-filters {
  margin: 0 0 var(--ds-space-3);
  padding: var(--ds-space-3) 0;
  border-block: 1px solid var(--ds-line);
}

#panel-customers .crm-more-filters summary,
#panel-customers .crm-finance-details summary,
#panel-customers .crm-edit-details summary {
  cursor: pointer;
  color: var(--ds-accent-strong);
  font-weight: 800;
}

#panel-customers .crm-more-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-inbox-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-4);
  align-items: start;
}

#panel-customers .crm-inbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--ds-space-4);
  align-items: start;
}

#panel-customers .crm-inbox-section {
  display: grid;
  gap: var(--ds-space-3);
  min-width: 0;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-paper-strong);
}

#panel-customers .crm-inbox-section .section-head {
  margin: 0;
}

#panel-customers .crm-action-dock {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

#panel-customers .crm-finance-details {
  padding: var(--ds-space-3) 0;
  border-block: 1px solid var(--ds-line);
}

#panel-customers .crm-finance-details .crm-kpi-strip {
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-kpi-strip-primary {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}

#panel-customers .crm-brief-list {
  display: grid;
  gap: 0;
}

#panel-customers .crm-brief-list > div {
  display: grid;
  grid-template-columns: minmax(92px, 0.32fr) minmax(0, 1fr);
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-line);
}

#panel-customers .crm-brief-list span,
#panel-customers .crm-brief-list small {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-brief-list strong,
#panel-customers .crm-brief-list small {
  min-width: 0;
  overflow-wrap: anywhere;
}

#panel-customers .crm-brief-list small {
  grid-column: 2;
}

#panel-customers .crm-edit-details {
  margin-top: var(--ds-space-4);
}

#panel-customers .crm-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

@container crm-shell (max-width: 620px) {
  #panel-customers .crm-work-item,
  #panel-customers .crm-inbox-head,
  #panel-customers .crm-brief-list > div {
    grid-template-columns: minmax(0, 1fr);
  }

  #panel-customers .crm-work-item-side,
  #panel-customers .crm-brief-list small {
    grid-column: 1;
  }

  #panel-customers .crm-work-summary span {
    width: 100%;
    margin-right: 0;
  }
}

#panel-customers .crm-onboarding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-accent-soft);
}

#panel-customers .crm-onboarding > div {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

#panel-customers .crm-onboarding strong,
#panel-customers .crm-onboarding span {
  overflow-wrap: anywhere;
}

#panel-customers .crm-onboarding span {
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
}

#panel-customers .crm-action-item,
#panel-customers .crm-ai-brief {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
  padding: var(--ds-space-3);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-surface-clean);
}

#panel-customers .crm-action-item.urgency-high {
  border-inline-start: 4px solid var(--ds-danger);
}

#panel-customers .crm-action-item.urgency-elevated {
  border-inline-start: 4px solid var(--ds-warn);
}

#panel-customers .crm-action-item-head,
#panel-customers .crm-ai-brief-head,
#panel-customers .crm-action-buttons,
#panel-customers .crm-density-switch,
#panel-customers .crm-customer-pagination {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
}

#panel-customers .crm-action-item-head,
#panel-customers .crm-ai-brief-head {
  justify-content: space-between;
}

#panel-customers .crm-action-customer {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-lg);
  font-weight: 900;
  text-align: left;
  overflow-wrap: anywhere;
}

#panel-customers .crm-action-customer::after {
  display: none;
}

#panel-customers .crm-action-summary,
#panel-customers .crm-ai-brief p {
  margin: 0;
  color: var(--ds-ink);
  font-size: var(--ds-text-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#panel-customers .crm-action-next,
#panel-customers .crm-ai-next {
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-sm);
  overflow-wrap: anywhere;
}

#panel-customers .crm-action-item small,
#panel-customers .crm-ai-brief small {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-action-buttons {
  flex-wrap: wrap;
  padding-top: var(--ds-space-1);
}

#panel-customers .crm-action-buttons .small-button {
  min-height: 36px;
}

#panel-customers .crm-ai-brief {
  background: var(--ds-bg-aqua);
}

#panel-customers .crm-ai-brief.is-empty {
  border-style: dashed;
  background: var(--ds-paper-soft);
}

#panel-customers .crm-ai-detail-panel {
  grid-column: 1 / -1;
}

#panel-customers .crm-ai-detail-summary {
  display: grid;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-line);
}

#panel-customers .crm-ai-detail-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--ds-space-2) var(--ds-space-4);
}

#panel-customers .crm-ai-detail-section {
  min-width: 0;
  padding: var(--ds-space-2) 0;
  border-bottom: 1px solid var(--ds-line);
}

#panel-customers .crm-ai-detail-section summary {
  cursor: pointer;
  font-weight: 700;
}

#panel-customers .crm-ai-detail-section p {
  margin: var(--ds-space-2) 0 0;
  color: var(--ds-muted);
  overflow-wrap: anywhere;
}

#panel-customers .crm-ai-brief-detail {
  display: grid;
  gap: var(--ds-space-2);
}

#panel-customers .crm-redesign-shell[data-crm-density="compact"] .crm-ai-brief-detail,
#panel-customers .crm-redesign-shell[data-crm-density="compact"] .crm-ai-brief .crm-action-buttons button[data-ai-brief-action="confirm"] {
  display: none;
}

#panel-customers .crm-density-switch {
  flex: 0 0 auto;
  padding: var(--ds-space-1);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-paper-soft);
}

#panel-customers .crm-density-switch button {
  min-height: 34px;
  padding: var(--ds-space-2) var(--ds-space-3);
  border: 0;
  border-radius: var(--ds-radius-pill);
  background: transparent;
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
  font-weight: 800;
  box-shadow: none;
}

#panel-customers .crm-density-switch button::after {
  display: none;
}

#panel-customers .crm-density-switch button.active {
  background: var(--ds-paper-strong);
  color: var(--ds-accent-strong);
}

#panel-customers .crm-customer-pagination {
  justify-content: center;
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-line);
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-customer-row {
  grid-template-rows: none;
}

@container crm-shell (max-width: 620px) {
  #panel-customers .crm-onboarding,
  #panel-customers .crm-rail-head {
    align-items: stretch;
    flex-direction: column;
  }

  #panel-customers .crm-action-buttons .small-button,
  #panel-customers .crm-density-switch button,
  #panel-customers .crm-customer-pagination .small-button {
    min-height: 44px;
  }
}

/* Unified questionnaire editor */
#logsWorkspace[data-logs-workspace="questionnaire"] {
  grid-template-columns: minmax(0, 1fr);
}

.questionnaire-config-card {
  container-type: inline-size;
}

.questionnaire-config-meta,
.questionnaire-page-head,
.questionnaire-question-head,
.questionnaire-page-title,
.questionnaire-checkbox {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-width: 0;
}

.questionnaire-config-meta {
  flex-wrap: wrap;
  margin-bottom: var(--ds-space-6);
}

.questionnaire-editor,
.questionnaire-pages,
.questionnaire-questions {
  display: grid;
  gap: var(--ds-space-6);
  min-width: 0;
}

.questionnaire-meta-grid,
.questionnaire-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--ds-space-4);
  min-width: 0;
}

.questionnaire-meta-grid {
  padding: var(--ds-space-6);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-paper-soft);
}

.questionnaire-page-card {
  display: grid;
  gap: var(--ds-space-5);
  min-width: 0;
  padding: var(--ds-space-6);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-card);
  background: var(--ds-paper-strong);
  box-shadow: var(--ds-shadow-sm);
}

.questionnaire-page-head,
.questionnaire-question-head {
  justify-content: space-between;
  align-items: flex-start;
}

.questionnaire-page-title {
  flex: 1;
}

.questionnaire-page-title input {
  min-width: 0;
  max-width: 520px;
  font-size: var(--ds-text-lg);
  font-weight: 800;
}

.questionnaire-question-row {
  display: grid;
  gap: var(--ds-space-4);
  min-width: 0;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-clean);
}

.questionnaire-question-head code {
  min-width: 0;
  overflow: hidden;
  color: var(--ds-muted);
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.questionnaire-field {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
  font-weight: 700;
}

.questionnaire-field input,
.questionnaire-field textarea,
.questionnaire-field select,
.questionnaire-page-title input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-surface-clean);
  color: var(--ds-ink);
  font: inherit;
}

.questionnaire-field input,
.questionnaire-field select,
.questionnaire-page-title input {
  min-height: 40px;
  padding: 0 var(--ds-space-4);
}

.questionnaire-field textarea {
  min-height: 76px;
  padding: var(--ds-space-3) var(--ds-space-4);
  resize: vertical;
}

.questionnaire-field-wide {
  grid-column: span 2;
}

.questionnaire-field-full {
  grid-column: 1 / -1;
}

.questionnaire-checkbox {
  align-self: end;
  min-height: 40px;
  color: var(--ds-ink);
  font-size: var(--ds-text-sm);
  font-weight: 700;
}

.questionnaire-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--ds-accent-strong);
}

.compact-button {
  min-height: 30px;
  padding: var(--ds-space-1) var(--ds-space-3);
  font-size: var(--ds-text-xs);
}

@container (max-width: 760px) {
  .questionnaire-page-head,
  .questionnaire-question-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .questionnaire-page-head .toolbar-inline,
  .questionnaire-question-head .toolbar-inline {
    justify-content: flex-start;
  }

  .questionnaire-field-wide {
    grid-column: 1 / -1;
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--ds-font-sans);
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  background-color: #03121b;
  background-image: url("./assets/workbench-bg-optimized.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

body::before {
  display: none;
}

body[data-panel="dashboard"] {
  --panel-glow: var(--ds-accent-bright-soft);
  --panel-glow-secondary: var(--ds-brand-blue-soft);
  --panel-glow-tertiary: rgba(84, 239, 216, 0.16);
}

body[data-panel="assistant"] {
  --panel-glow: rgba(100, 226, 255, 0.24);
  --panel-glow-secondary: rgba(78, 239, 205, 0.2);
  --panel-glow-tertiary: rgba(183, 246, 211, 0.15);
}

body[data-panel="customers"] {
  --panel-glow: rgba(70, 227, 210, 0.24);
  --panel-glow-secondary: rgba(109, 205, 255, 0.22);
  --panel-glow-tertiary: rgba(188, 255, 236, 0.14);
}

body[data-panel="quotes"] {
  --panel-glow: rgba(88, 221, 255, 0.24);
  --panel-glow-secondary: rgba(48, 238, 188, 0.2);
  --panel-glow-tertiary: rgba(160, 219, 255, 0.16);
}

body[data-panel="products"] {
  --panel-glow: rgba(72, 255, 202, 0.24);
  --panel-glow-secondary: rgba(0, 127, 224, 0.18);
  --panel-glow-tertiary: rgba(178, 255, 228, 0.16);
}

body[data-panel="brands"] {
  --panel-glow: rgba(65, 224, 183, 0.24);
  --panel-glow-secondary: rgba(85, 195, 255, 0.2);
  --panel-glow-tertiary: rgba(164, 255, 233, 0.14);
}

body[data-panel="content"] {
  --panel-glow: rgba(92, 216, 255, 0.24);
  --panel-glow-secondary: rgba(58, 234, 206, 0.18);
  --panel-glow-tertiary: rgba(125, 220, 255, 0.16);
}

body[data-panel="knowledge"] {
  --panel-glow: rgba(107, 245, 214, 0.24);
  --panel-glow-secondary: rgba(115, 181, 255, 0.18);
  --panel-glow-tertiary: rgba(199, 255, 234, 0.16);
}

body[data-panel="logs"] {
  --panel-glow: rgba(98, 214, 255, 0.22);
  --panel-glow-secondary: rgba(78, 232, 205, 0.18);
  --panel-glow-tertiary: rgba(187, 245, 255, 0.15);
}

.ambient-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-stage,
.cursor-field {
  display: none;
}

.cursor-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.cursor-aura,
.cursor-ring {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.cursor-spark {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 255, 252, 0.95) 0%, rgba(108, 251, 231, 0.54) 42%, transparent 72%);
  box-shadow:
    0 0 20px rgba(104, 252, 235, 0.28),
    0 0 36px rgba(108, 170, 255, 0.16);
  opacity: 0;
  filter: blur(0.4px);
  will-change: transform, opacity;
  transition: opacity 0.2s ease;
}

.cursor-aura {
  width: 440px;
  height: 440px;
  background:
    radial-gradient(circle, rgba(104, 250, 229, 0.18) 0%, rgba(112, 170, 255, 0.1) 28%, rgba(112, 170, 255, 0.04) 44%, transparent 72%);
  filter: blur(20px);
  opacity: 0.42;
  mix-blend-mode: screen;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(173, 252, 243, 0.58);
  box-shadow:
    0 0 18px rgba(94, 248, 228, 0.22),
    inset 0 0 18px rgba(129, 179, 255, 0.1);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.16s ease, width 0.16s ease, height 0.16s ease;
}

body.pointer-awake .cursor-ring {
  opacity: 1;
}

.cursor-ring.is-pressed {
  width: 28px;
  height: 28px;
}

.ambient-canvas,
.ambient-grid,
.ambient-noise,
.ambient-glow,
.ambient-particles {
  position: absolute;
  inset: 0;
}

.ambient-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.94;
}

.ambient-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
  opacity: 0.18;
}

.ambient-noise {
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.2px),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.2px),
    radial-gradient(circle at 55% 75%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1.2px);
  background-size: 220px 220px, 300px 300px, 260px 260px;
  opacity: 0.26;
  mix-blend-mode: screen;
}

.ambient-glow {
  filter: blur(38px);
  opacity: 0.84;
}

.ambient-glow-a {
  top: -18%;
  left: -8%;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--panel-glow), transparent 68%);
  animation: driftAurora 24s ease-in-out infinite;
}

.ambient-glow-b {
  top: 10%;
  right: -14%;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--panel-glow-secondary), transparent 70%);
  animation: driftAurora 32s ease-in-out infinite reverse;
}

.ambient-glow-c {
  bottom: -26%;
  left: 26%;
  width: 36vw;
  height: 36vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--panel-glow-tertiary), transparent 72%);
  animation: pulseAurora 18s ease-in-out infinite;
}

.ambient-particles span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 255, 252, 0.96), rgba(101, 233, 214, 0.22) 58%, transparent 72%);
  box-shadow:
    0 0 14px rgba(132, 255, 231, 0.32),
    0 0 36px rgba(105, 180, 255, 0.16);
  opacity: 0.6;
  animation: floatParticle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.layout {
  display: grid;
  grid-template-columns: var(--ds-sidebar-width, clamp(188px, 13vw, 224px)) minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.layout > *,
.content-shell,
.content,
.panel,
.panel-shell,
.card,
.card > *,
.topbar,
.topbar > *,
.topbar-main,
.topbar-main > *,
.topbar-actions,
.toolbar-inline,
.subhead > *,
.section-head,
.section-head > *,
.quote-builder-column,
.quote-preview-column,
.quote-layout > *,
.split > *,
.crm-board > *,
.product-workspace > *,
.quote-status-card > *,
.quote-action-groups,
.quote-status-actions {
  min-width: 0;
}

.panel,
.card,
.topbar,
.section-head,
.subhead,
.quote-status-card,
.quote-section-banner,
.dashboard-module-card,
.dashboard-hero-stage,
.procurement-item-card,
.procurement-brief,
.procurement-brand-detail {
  max-width: 100%;
}

.topbar p,
.section-head p,
.section-head .muted,
.section-head .tiny-note,
.card p,
.tiny-note,
.muted,
.nav-link,
.dashboard-module-card,
.dashboard-module-body,
.dashboard-module-foot,
.quote-status-card,
.quote-action-group,
.procurement-item-main,
.procurement-item-facts {
  overflow-wrap: anywhere;
  word-break: normal;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  min-width: 0;
  overflow: hidden;
  gap: clamp(12px, 1.05vw, 18px);
  padding: clamp(18px, 1.45vw, 24px) clamp(14px, 1.15vw, 18px) 22px;
  color: rgba(236, 251, 252, 0.9);
  background: rgba(4, 18, 27, 0.66);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.03),
    18px 0 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transition: background var(--ds-motion-base), box-shadow var(--ds-motion-base);
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand h1,
.topbar h2,
.hero-copy h3,
.card h3,
.card h4,
.group-block h4,
.subhead h4 {
  margin: 0;
}

.brand p {
  margin: 4px 0 0;
  color: rgba(224, 246, 248, 0.66);
  font-size: 12px;
  line-height: 1.35;
}

.brand h1 {
  font-size: clamp(20px, 1.32vw, 24px);
  line-height: 1.12;
  letter-spacing: 0;
  word-break: keep-all;
}

.brand-mark {
  width: clamp(46px, 3.35vw, 54px);
  height: clamp(46px, 3.35vw, 54px);
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.brand-mark img,
.quote-cover-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

.sidebar-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(184, 247, 244, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 34px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.28s ease,
    padding 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-card::after {
  content: "";
  position: absolute;
  inset: -40% auto auto 58%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 189, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.sidebar-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.sidebar-card p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(224, 246, 248, 0.7);
}

.sidebar-eyebrow {
  color: rgba(159, 238, 231, 0.8);
  margin-bottom: 12px;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: rgba(238, 251, 252, 0.9);
}

.nav {
  counter-reset: nav;
  display: grid;
  width: auto;
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
  gap: 7px;
}

.nav-link {
  counter-increment: nav;
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  min-height: 44px;
  padding: 12px 15px 12px 17px;
  color: inherit;
  background:
    radial-gradient(circle at 100% 50%, rgba(89, 151, 255, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  text-align: left;
  cursor: pointer;
  transition:
    background 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 8px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #59f0dc, #1fa29f);
  opacity: 0.42;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-link::after {
  display: none;
  content: none;
}

.nav-link:hover,
.nav-link.active {
  border-color: rgba(94, 255, 224, 0.22);
  background:
    radial-gradient(circle at 100% 50%, rgba(93, 171, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 30px rgba(4, 18, 25, 0.24),
    0 0 28px rgba(65, 231, 208, 0.12);
}

.nav-link.active {
  animation: navPulse 2.8s ease-in-out infinite;
}

.nav-link:hover::before,
.nav-link.active::before {
  opacity: 1;
  transform: scaleY(1.04);
}

.sidebar-card-status {
  margin-top: auto;
}

.sidebar-status-list {
  display: grid;
  gap: 12px;
}

.sidebar-status-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #8afbec 0%, #2fd9bf 60%, transparent 72%);
  box-shadow:
    0 0 12px rgba(95, 255, 232, 0.4),
    0 0 28px rgba(96, 175, 255, 0.24);
}

.sidebar-status-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(241, 252, 252, 0.94);
}

.sidebar-status-note {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(207, 233, 236, 0.72);
}

body[data-panel="dashboard"] .layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
}

body[data-panel="dashboard"] .sidebar {
  position: relative;
  width: min(100%, 1520px);
  height: auto;
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "brand"
    "nav";
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: clamp(34px, 5vh, 66px);
  padding: clamp(34px, 5vw, 82px) clamp(30px, 5vw, 74px);
  border-right: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-panel="dashboard"] .brand {
  grid-area: brand;
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-self: center;
  align-items: center;
  gap: clamp(18px, 2.2vw, 28px);
  max-width: none;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid rgba(166, 246, 241, 0.14);
  border-radius: 32px;
  background:
    radial-gradient(circle at 8% 0%, rgba(87, 247, 224, 0.16), transparent 34%),
    radial-gradient(circle at 100% 40%, rgba(79, 143, 255, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(8, 28, 42, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 28px 70px rgba(0, 8, 14, 0.22);
  backdrop-filter: blur(16px);
}

body[data-panel="dashboard"] .brand-mark {
  width: clamp(72px, 6vw, 96px);
  height: clamp(72px, 6vw, 96px);
  font-size: clamp(16px, 1.12vw, 20px);
}

body[data-panel="dashboard"] .brand h1 {
  max-width: none;
  font-size: clamp(44px, 4.6vw, 76px);
  line-height: 1.03;
  white-space: nowrap;
}

body[data-panel="dashboard"] .brand p {
  margin-top: 10px;
  font-size: clamp(15px, 1.2vw, 19px);
  color: rgba(224, 246, 248, 0.74);
}

body[data-panel="dashboard"] .nav {
  grid-area: nav;
  width: min(100%, 1240px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  gap: clamp(16px, 1.55vw, 24px);
}

body[data-panel="dashboard"] .nav-link[data-panel="dashboard"] {
  display: none;
}

body[data-panel="dashboard"] .nav-link {
  min-height: clamp(130px, 14vh, 172px);
  display: grid;
  place-items: center;
  padding: 32px 24px 36px;
  border-radius: 30px;
  border-color: rgba(166, 246, 241, 0.16);
  font-size: clamp(20px, 1.32vw, 28px);
  font-weight: 900;
  text-align: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 151, 255, 0.26), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(89, 240, 218, 0.2), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(55, 98, 137, 0.15) 50%, rgba(8, 27, 42, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(75, 236, 222, 0.08),
    0 26px 60px rgba(0, 8, 14, 0.28);
  backdrop-filter: blur(16px);
}

body[data-panel="dashboard"] .nav-link::before {
  inset: auto 50% 20px auto;
  width: 56px;
  height: 5px;
  transform: translateX(50%);
}

body[data-panel="dashboard"] .nav-link::after {
  right: 20px;
  top: 18px;
  transform: none;
  font-size: 13px;
}

body[data-panel="dashboard"] .nav-link:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: rgba(118, 255, 234, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 36px 76px rgba(0, 8, 14, 0.34),
    0 0 44px rgba(65, 231, 208, 0.18);
}

body[data-panel="dashboard"] .nav-link:hover::before {
  transform: translateX(50%) scaleX(1.18);
}

body[data-panel="dashboard"] #accountManagementNav,
body[data-panel="dashboard"] .session-user-card {
  display: none !important;
}

body[data-panel="dashboard"] .nav-link.active {
  animation: none;
}

.content {
  padding: 26px 30px 40px;
  position: relative;
  min-width: 0;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.34s ease 0.16s,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-panel="dashboard"] .content {
  display: none;
  overflow: hidden;
  height: 0;
  max-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(42px) scale(0.985);
}

.content-shell {
  max-width: 1720px;
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(248, 255, 255, 0.66), rgba(240, 251, 251, 0.44));
  box-shadow:
    0 18px 44px rgba(0, 10, 16, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

body[data-panel="dashboard"] .topbar {
  display: none;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.28) 18%, transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 28%);
  opacity: 0.72;
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto -6% -70% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 229, 205, 0.18), transparent 68%);
  animation: driftAurora 20s ease-in-out infinite;
  pointer-events: none;
}

.topbar p,
.muted,
.empty-state,
.tiny-note {
  color: var(--muted);
}

.topbar-main {
  display: grid;
  gap: 10px;
  align-content: start;
  max-width: 100%;
}

.topbar-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
  align-content: start;
  padding-right: clamp(96px, 13vw, 238px);
  max-width: 100%;
  transition:
    transform 0.28s ease,
    opacity 0.28s ease,
    filter 0.28s ease;
}

body:not([data-panel="dashboard"]) .topbar-actions .toolbar-inline:first-child {
  display: none;
}

.page-quick-actions {
  position: fixed;
  right: 14px;
  top: 12px;
  z-index: 80;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0, 10, 16, 0.22));
}

/* Page-level floating actions must share this glass control style. */
.floating-glass-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: rgba(231, 255, 252, 0.96);
  background: var(--ds-floating-control-bg);
  border: 1px solid var(--ds-floating-control-border);
  box-shadow: var(--ds-floating-control-shadow);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  backdrop-filter: blur(18px);
  pointer-events: auto;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.floating-glass-control:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 255, 241, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(78, 246, 224, 0.18),
    0 22px 42px rgba(0, 10, 18, 0.34),
    0 0 38px rgba(79, 238, 219, 0.28);
  filter: saturate(1.08);
}

.floating-glass-control:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(84, 239, 216, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 22px 42px rgba(0, 10, 18, 0.34),
    0 0 38px rgba(79, 238, 219, 0.28);
}

.manual-trigger {
  min-height: 46px;
  padding: 9px 15px 9px 10px;
  gap: 8px;
}

.manual-trigger::before {
  content: "?";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #062b33;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.84), transparent 34%),
    linear-gradient(135deg, #8effeb, #29b8e1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 0 18px rgba(85, 248, 225, 0.36);
  font-size: 14px;
  line-height: 1;
}

body[data-panel="dashboard"] .manual-trigger {
  display: none;
}

.floating-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.chrome-compact .floating-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-action-button {
  width: 48px;
  height: 46px;
  min-width: 48px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.panel-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.topbar p {
  margin: 0;
  max-width: 760px;
}

.workspace-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(60, 218, 207, 0.18);
  background: linear-gradient(180deg, rgba(44, 218, 197, 0.12), rgba(89, 157, 255, 0.08));
  color: #0d6878;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.topbar-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-pills,
.topbar-status {
  display: none;
}

.topbar-status-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 127, 144, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(234, 247, 248, 0.62));
  color: #0c5f6e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar-inline,
.pill-row,
.file-actions,
.tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.product-grid-filters {
  margin: 2px 0 14px;
  padding: 16px;
  border: 1px solid rgba(19, 132, 143, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(245, 255, 253, 0.92), rgba(255, 255, 255, 0.88));
}

.product-branch-filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.product-branch-filter-grid .field-block {
  gap: 6px;
}

button,
.ghost-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  border-radius: 16px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  font-weight: 700;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

button:hover,
.ghost-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

button {
  border: 0;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(135deg, #59efd8, #13919a 52%, #174fa6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 20px 36px rgba(8, 92, 130, 0.26),
    0 0 28px rgba(68, 234, 210, 0.18);
}

.deal-action-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(27, 154, 111, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(84, 239, 216, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(242, 255, 250, 0.94), rgba(230, 247, 255, 0.74));
}

.deal-action-strip strong {
  display: block;
  color: #0b5d5b;
}

.deal-button {
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 16px;
  color: #062b25;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(135deg, #96ffd8, #47e2bd 48%, #5fb8ff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 18px 34px rgba(25, 150, 121, 0.24),
    0 0 26px rgba(77, 241, 219, 0.2);
}

.deal-button.compact {
  min-height: 38px;
  padding: 9px 14px;
  font-size: 13px;
}

button::after,
.dashboard-cta::after {
  content: "";
  position: absolute;
  inset: -120% auto auto -30%;
  width: 52%;
  height: 260%;
  transform: rotate(18deg);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  opacity: 0.72;
  animation: buttonSweep 5.8s linear infinite;
  pointer-events: none;
}

.ghost-button,
.link-button {
  border: 1px solid var(--line);
  color: var(--accent-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(242, 252, 251, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 12px 24px rgba(8, 42, 56, 0.06);
}

.ghost-button.manual-trigger {
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #06313b;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, rgba(232, 255, 252, 0.96), rgba(116, 232, 225, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 18px 34px rgba(12, 120, 158, 0.18),
    0 0 26px rgba(79, 238, 219, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.icon-button {
  padding-inline: 12px;
}

.small-button {
  padding: 8px 12px;
}

.active-toggle {
  border-color: rgba(18, 122, 132, 0.32);
  background: rgba(18, 122, 132, 0.1);
}

.panel {
  display: none;
  animation: panelFade 0.18s ease;
}

.panel.active {
  display: block;
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.metric-card,
.quote-group,
.bar-row,
.area-chip,
.list-item,
.mini-card,
.detail-card-block,
.survey-card,
.summary-card,
.product-group,
.share-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(94, 255, 224, 0.26), rgba(93, 171, 255, 0.16), rgba(255, 255, 255, 0.08));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 226, 255, 0.16), transparent 68%);
  opacity: 0.78;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 34px 72px rgba(0, 10, 16, 0.32),
    0 0 36px rgba(86, 202, 255, 0.08);
  border-color: rgba(66, 228, 208, 0.2);
}

.interactive-surface {
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.interactive-surface.tilt-active {
  transform:
    translate3d(var(--tilt-x, 0), var(--tilt-y, 0), 0)
    rotateX(var(--tilt-rx, 0deg))
    rotateY(var(--tilt-ry, 0deg));
}

.workspace-mode-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 24px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(120, 232, 224, 0.12);
  background: linear-gradient(180deg, rgba(247, 255, 255, 0.12), rgba(247, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.workspace-mode-button {
  min-width: 112px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: rgba(235, 252, 249, 0.82);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: none;
}

.workspace-mode-button::after {
  display: none;
}

.workspace-mode-button.active {
  color: #06242d;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(135deg, #64f5dc, #7ce4ff 56%, #72b7ff);
  box-shadow:
    0 14px 30px rgba(7, 78, 101, 0.26),
    0 0 28px rgba(88, 235, 220, 0.2);
}

.workspace-mode-button:hover {
  border-color: rgba(124, 244, 234, 0.24);
  color: rgba(245, 255, 254, 0.96);
}

.surface-fold {
  border: 1px solid rgba(105, 225, 227, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(249, 255, 255, 0.9), rgba(241, 251, 251, 0.72));
  box-shadow:
    0 18px 46px rgba(0, 9, 16, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
  overflow: hidden;
}

.surface-fold + .surface-fold {
  margin-top: 2px;
}

.surface-fold summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(16, 113, 121, 0.09), rgba(16, 113, 121, 0.03));
}

.surface-fold summary::-webkit-details-marker {
  display: none;
}

.surface-fold-copy {
  display: grid;
  gap: 6px;
}

.surface-fold-copy strong {
  font-size: 15px;
}

.surface-fold-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 132, 145, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: #0e6672;
  font-size: 12px;
  font-weight: 700;
}

.surface-fold-body {
  padding: 18px 20px 20px;
}

.section-toolbar {
  margin-bottom: 14px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(69, 230, 212, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(74, 145, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(251, 255, 255, 0.92), rgba(241, 252, 251, 0.78));
  isolation: isolate;
}

.hero-card::after {
  right: -42px;
  top: -48px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(68, 238, 213, 0.16), transparent 64%);
  animation: floatGlow 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hero-copy,
.metric-grid,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-copy {
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}

.hero-copy h3 {
  font-size: 34px;
  line-height: 1.32;
  max-width: 760px;
  margin-bottom: 10px;
}

.hero-copy p {
  max-width: 720px;
}

.hero-visual {
  min-height: 240px;
  border-radius: 30px;
  border: 1px solid rgba(108, 231, 226, 0.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(47, 218, 202, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(11, 27, 40, 0.92), rgba(10, 20, 30, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 60px rgba(71, 211, 255, 0.08),
    0 24px 44px rgba(0, 6, 10, 0.26);
  overflow: hidden;
}

.hero-orbit,
.hero-core,
.hero-beam,
.hero-badge {
  position: absolute;
}

.hero-orbit {
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(106, 242, 225, 0.16);
  transform: translate(-50%, -50%);
}

.hero-orbit-outer {
  width: 190px;
  height: 190px;
  animation: spinHalo 18s linear infinite;
}

.hero-orbit-middle {
  width: 138px;
  height: 138px;
  border-style: dashed;
  animation: spinHalo 13s linear infinite reverse;
}

.hero-orbit-inner {
  width: 92px;
  height: 92px;
  animation: spinHalo 8s linear infinite;
}

.hero-core {
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(75, 247, 226, 0.84) 45%, rgba(57, 150, 255, 0.38) 72%, transparent 76%);
  box-shadow:
    0 0 0 10px rgba(58, 222, 205, 0.08),
    0 0 30px rgba(73, 241, 214, 0.34),
    0 0 54px rgba(93, 166, 255, 0.24);
  animation: pulseCore 3.6s ease-in-out infinite;
}

.hero-beam {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 84%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, transparent, rgba(93, 231, 214, 0.48), rgba(98, 172, 255, 0.42), transparent);
  filter: blur(0.4px);
  animation: pulseBeam 4s ease-in-out infinite;
}

.hero-badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 19, 29, 0.76);
  color: rgba(220, 252, 249, 0.86);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(0, 6, 10, 0.24);
}

.hero-badge-a {
  top: 22px;
  left: 24px;
}

.hero-badge-b {
  right: 20px;
  top: 92px;
}

.hero-badge-c {
  left: 34px;
  bottom: 22px;
}

.hero-card .metric-grid {
  grid-column: 1 / -1;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.stack,
.list,
.chart-stack,
.detail-body,
.area-board,
.grouped-list,
.crm-side-sections,
.content-mini-stack {
  display: grid;
  gap: 14px;
}

.content-mini-stack {
  margin-top: 14px;
}

.metric-grid,
.split,
.detail-meta,
.detail-columns,
.form-grid,
.dashboard-layout,
.chart-grid,
.detail-expand-grid,
.quote-layout,
.share-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card {
  position: relative;
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at top right, rgba(45, 191, 172, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(84, 155, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 252, 251, 0.82));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #7cf8ec 0%, #2bcfc0 62%, transparent 72%);
  box-shadow:
    0 0 12px rgba(92, 255, 231, 0.34),
    0 0 24px rgba(101, 179, 255, 0.18);
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 44px rgba(0, 8, 14, 0.22),
    0 0 24px rgba(71, 213, 223, 0.1);
}

.metric-value {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 700;
  color: #06313b;
}

.metric-footnote {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
}

.chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(247, 254, 253, 0.9), rgba(242, 251, 251, 0.8));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.data-detail summary {
  cursor: pointer;
  padding: 18px 18px;
  list-style: none;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(18, 122, 132, 0.1), rgba(18, 122, 132, 0.04));
}

.data-detail summary::-webkit-details-marker {
  display: none;
}

.detail-body {
  padding: 16px 18px 18px;
}

.bar-row,
.mini-card,
.share-card {
  padding: 14px;
}

.bar-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 253, 252, 0.84));
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(18, 122, 132, 0.12);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #20b3b3, #0a6783);
}

.donut-wrap {
  display: grid;
  gap: 16px;
}

.donut-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart {
  position: relative;
  width: 188px;
  height: 188px;
  border-radius: 50%;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(18, 122, 132, 0.08);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 1;
}

.donut-center strong {
  font-size: 28px;
}

.donut-legend {
  display: grid;
  gap: 10px;
}

.legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(18, 122, 132, 0.05);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.split {
  grid-template-columns: 1.02fr 1.3fr;
}

.split.narrow {
  grid-template-columns: 0.92fr 1.08fr;
}

#brandWorkspace[data-brand-workspace="orders"] {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 22px;
}

#orderList {
  container-type: inline-size;
}

.product-workspace {
  grid-template-columns: minmax(380px, 1.16fr) minmax(420px, 0.94fr);
  align-items: start;
}

.crm-board[data-customer-workspace-mode="focus"] {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
}

.crm-board[data-customer-workspace-mode="update"] {
  grid-template-columns: minmax(0, 1.14fr) minmax(360px, 0.86fr);
}

.quote-layout[data-quote-workspace-mode="deliver"],
.quote-layout[data-quote-workspace-mode="library"],
.product-workspace[data-product-workspace-mode="rules"] {
  grid-template-columns: 1fr;
}

.product-workspace[data-product-workspace-mode="grid"] {
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
}

.split > *,
.split.narrow > *,
.crm-board > *,
.quote-layout > *,
.product-workspace > * {
  min-width: 0;
}

.crm-side-sections {
  grid-template-columns: 1fr;
}

.crm-board {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 0.92fr) minmax(380px, 1.08fr) minmax(340px, 0.94fr);
  align-items: start;
}

.crm-panel {
  align-self: start;
}

.crm-panel,
.detail-card {
  background:
    radial-gradient(circle at top right, rgba(45, 191, 172, 0.1), transparent 24%),
    radial-gradient(circle at bottom left, rgba(95, 169, 255, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 254, 252, 0.8));
}

.crm-filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.crm-filter-grid .search {
  grid-column: 1 / -1;
}

.search,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 253, 252, 0.86));
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 10px 20px rgba(4, 25, 34, 0.04);
}

.search:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(36, 191, 180, 0.34);
  box-shadow:
    0 0 0 4px rgba(36, 191, 180, 0.08),
    0 0 28px rgba(87, 171, 255, 0.08);
}

.search-inline {
  max-width: 320px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.form-stack-grid {
  display: grid;
  gap: 14px;
}

.compact-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full,
.form-grid textarea,
.form-grid button,
.checkbox-line {
  grid-column: 1 / -1;
}

.customer-business-mode {
  display: grid;
  gap: var(--ds-space-2, 8px);
  padding: var(--ds-space-3, 12px);
  border: 1px solid var(--line);
  border-radius: var(--ds-radius-md, 16px);
  background: rgba(255, 255, 255, 0.48);
}

.customer-business-mode > span {
  font-weight: 800;
  color: var(--accent-strong);
}

.customer-business-mode > small {
  color: var(--muted);
  line-height: 1.5;
}

.field-combo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.field-block {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: 0.04em;
}

.form-fold {
  position: relative;
}

.form-fold .surface-fold-body {
  padding: 18px 20px 20px;
}

.form-fold .form-grid {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.form-fold .checkbox-line.field-block {
  display: grid;
  gap: 10px;
  justify-items: start;
  align-content: start;
}

.form-fold .checkbox-line.field-block input {
  margin: 0;
}

.form-submit-row {
  display: flex;
  justify-content: flex-end;
}

.form-submit-row button {
  min-width: 156px;
}

.quote-branch-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.subhead,
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(19, 132, 143, 0.08);
}

.subhead > :first-child,
.section-head > :first-child {
  flex: 1 1 240px;
  min-width: min(100%, 240px);
  max-width: 100%;
}

.subhead h1,
.subhead h2,
.subhead h3,
.subhead h4,
.section-head h1,
.section-head h2,
.section-head h3,
.section-head h4,
.section-head span,
.section-head p,
.section-head .tiny-note,
.section-head .muted {
  word-break: normal;
  overflow-wrap: break-word;
}

.subhead {
  margin-bottom: 10px;
}

.compact-list .list-item {
  padding: 12px 14px;
}

.compact-list {
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.product-grid-shell {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(242, 252, 251, 0.8));
  backdrop-filter: blur(18px);
}

.table-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.table-grid th,
.table-grid td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(18, 122, 132, 0.08);
  vertical-align: middle;
  text-align: left;
}

.table-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(235, 250, 248, 0.98), rgba(224, 244, 248, 0.96));
  color: #0f6b7d;
  font-size: 12px;
}

.table-grid td input {
  min-width: 96px;
  margin: 0;
  padding: 8px 10px;
  background: rgba(248, 255, 254, 0.96);
}

.table-grid .active-row {
  background: rgba(231, 252, 248, 0.96);
}

.table-strong {
  font-weight: 700;
  min-width: 150px;
}

.table-muted {
  color: var(--muted);
  min-width: 96px;
}

.list-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 253, 252, 0.78));
}

.compact-entry {
  padding: 14px 16px;
  border-radius: 18px;
}

.compact-entry strong {
  display: block;
  margin-bottom: 4px;
}

.showcase-card,
.empty-state-panel {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: 24px;
}

.showcase-card {
  background:
    radial-gradient(circle at top right, rgba(93, 210, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(88, 242, 214, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(252, 255, 255, 0.96), rgba(239, 251, 249, 0.92));
}

.showcase-card::after,
.empty-state-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -62% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 210, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.empty-state-panel {
  background:
    radial-gradient(circle at top left, rgba(96, 243, 219, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(248, 255, 255, 0.94), rgba(239, 248, 249, 0.9));
  border-style: dashed;
}

.showcase-eyebrow {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0c92a4;
}

.showcase-pill-row,
.empty-state-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.showcase-pill,
.empty-state-point {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 122, 132, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: #0b6571;
  font-size: 12px;
  font-weight: 700;
}

.empty-state-point {
  border-style: dashed;
}

.intel-entry,
.knowledge-entry {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 252, 252, 0.88));
}

.knowledge-group > .stack,
.product-group > .stack {
  gap: 10px;
}

#knowledgeWorkspace .knowledge-group > .stack {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  align-items: stretch;
}

#knowledgeWorkspace .knowledge-entry {
  min-width: 0;
  height: 100%;
}

.clickable {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.clickable:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(242, 255, 253, 0.96);
}

.active-card {
  border-color: rgba(18, 122, 132, 0.32);
  background:
    radial-gradient(circle at top right, rgba(97, 175, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(240, 255, 252, 1), rgba(225, 248, 245, 1));
}

.active-record {
  border-color: rgba(18, 122, 132, 0.38);
  background:
    radial-gradient(circle at 100% 0%, rgba(101, 169, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(235, 255, 252, 1), rgba(221, 246, 242, 1));
  box-shadow:
    0 16px 30px rgba(18, 122, 132, 0.1),
    0 0 24px rgba(93, 210, 234, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  border-radius: 999px;
  background: rgba(18, 122, 132, 0.1);
  color: var(--accent-strong);
}

.pill.ok {
  background: rgba(30, 147, 105, 0.12);
  color: var(--ok);
}

.pill.warn {
  background: rgba(201, 135, 37, 0.12);
  color: var(--warn);
}

.warn-pill {
  background: rgba(201, 135, 37, 0.12);
  color: var(--warn);
}

.pill.danger {
  background: rgba(192, 74, 94, 0.12);
  color: var(--danger);
}

.detail-card {
  min-height: 780px;
  display: grid;
  align-content: start;
}

.detail-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-meta > div,
.summary-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(244, 255, 253, 0.86);
  border: 1px solid rgba(18, 122, 132, 0.1);
}

.customer-meta-rail > div {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(246, 255, 253, 0.96), rgba(235, 250, 248, 0.88));
}

.customer-meta-rail > div::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(95, 244, 221, 0.9), rgba(72, 144, 255, 0.72));
  opacity: 0.72;
}

.detail-columns {
  grid-template-columns: 1fr 1fr;
}

.survey-grid {
  display: grid;
  gap: 14px;
}

.survey-card {
  padding: 18px;
}

.customer-hero-card,
.lead-hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(85, 238, 217, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(251, 255, 255, 0.98), rgba(239, 251, 250, 0.9));
}

.customer-hero-card::before,
.lead-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.34) 14%, transparent 28%);
  animation: sheenSweep 7.8s linear infinite;
  pointer-events: none;
}

.customer-hero-card::after,
.lead-hero-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 183, 255, 0.16), transparent 66%);
  pointer-events: none;
}

.customer-review-card {
  position: relative;
  overflow: hidden;
}

.survey-category,
.fold-card {
  margin-top: 14px;
  border: 1px solid rgba(18, 122, 132, 0.12);
  border-radius: 18px;
  background: rgba(248, 255, 254, 0.9);
  overflow: hidden;
}

.survey-category summary,
.fold-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 14px 16px;
  list-style: none;
  font-weight: 700;
  color: var(--accent-strong);
  background: rgba(18, 122, 132, 0.06);
}

.survey-category summary::-webkit-details-marker,
.fold-card summary::-webkit-details-marker {
  display: none;
}

.survey-category-body,
.fold-card-body {
  padding: 14px 16px 16px;
}

.survey-category h5,
.workbench-grid h5 {
  margin: 0 0 8px;
  color: var(--accent);
}

.kv-list {
  display: grid;
  gap: 8px;
}

.kv-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(18, 122, 132, 0.05);
  border: 1px solid rgba(18, 122, 132, 0.08);
}

.kv-key {
  font-size: 12px;
  color: var(--muted);
}

.prelike {
  white-space: pre-wrap;
  word-break: break-word;
}

.hidden {
  display: none !important;
}

.area-board {
  margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.area-chip {
  padding: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 255, 252, 0.92));
}

.area-chip.active {
  border-color: rgba(18, 122, 132, 0.32);
  background: linear-gradient(180deg, rgba(238, 255, 252, 1), rgba(222, 248, 244, 1));
}

.area-chip strong {
  display: block;
}

.compact-head {
  align-items: flex-start;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.tiny-button {
  padding: 6px 10px;
  font-size: 12px;
}

.quote-layout {
  grid-template-columns: minmax(min(100%, 300px), 0.94fr) minmax(0, 1.12fr);
  align-items: start;
}

.quote-group {
  padding: 18px;
}

.quote-group-surface {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(78, 227, 211, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(252, 255, 255, 0.96), rgba(243, 252, 251, 0.9));
}

.quote-group-surface::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(98, 244, 219, 0.12), rgba(98, 244, 219, 0.8), rgba(102, 160, 255, 0.18));
}

.quote-group-kicker {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #13a8b0;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px dashed rgba(18, 122, 132, 0.18);
}

.quote-category-divider {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0 2px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 89, 99, 0.14);
  background: rgba(15, 89, 99, 0.06);
  color: #0f5963;
}

.quote-category-divider span {
  color: var(--muted);
  font-size: 12px;
}

.quote-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.quote-row-main {
  flex: 1;
  min-width: 0;
}

.quote-row-summary {
  display: grid;
  gap: 8px;
}

.quote-row-meta {
  color: var(--muted);
  line-height: 1.6;
}

.quote-row-note {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 130, 141, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(240, 252, 250, 0.84));
  color: #0c5869;
  line-height: 1.65;
  white-space: pre-line;
}

.quote-row-chipline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-row-actions {
  min-width: 180px;
  align-items: flex-end;
}

.quote-row-surface {
  position: relative;
}

.quote-row-surface.is-open {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(17, 130, 141, 0.14);
  background:
    radial-gradient(circle at top right, rgba(99, 242, 221, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 255, 253, 0.9));
  box-shadow: 0 18px 34px rgba(8, 73, 97, 0.08);
}

.quote-line-total {
  padding: 10px 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(135deg, rgba(98, 244, 219, 0.18), rgba(117, 190, 255, 0.14));
  border: 1px solid rgba(21, 134, 146, 0.14);
  color: #0c6673;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(8, 88, 112, 0.12);
}

.quote-cost-total {
  align-self: flex-end;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 89, 99, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: #31535b;
  font-weight: 800;
}

.quote-inline-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.quote-row-editor {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(17, 130, 141, 0.12);
  background:
    radial-gradient(circle at top left, rgba(99, 242, 221, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 251, 249, 0.88));
}

.quote-row-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.quote-row-editor-head strong {
  display: block;
}

.field-block.compact input,
.field-block.compact select {
  padding: 9px 11px;
}

.field-block.compact textarea,
.quote-note-input {
  min-height: 86px;
  padding: 10px 12px;
}

.pricing-mode-panel,
.product-pricing-hint {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(18, 122, 132, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(246, 253, 252, 0.95), rgba(232, 247, 245, 0.72));
}

.pricing-mode-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(11, 73, 84, 0.08);
}

.segmented-control button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #0f5963;
  box-shadow: none;
}

.segmented-control button.active {
  background: #0f5963;
  color: #ffffff;
}

.pricing-component-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-formula-preview {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f5963;
  font-weight: 800;
}

.quote-sort-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px dashed rgba(15, 89, 99, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: #31535b;
  line-height: 1.6;
}

.quote-finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quote-finance-grid > div {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 89, 99, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.quote-finance-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.product-pricing-hint {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: #31535b;
}

.product-pricing-hint strong {
  color: #0f5963;
}

.quote-cover,
.quote-total {
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(45, 189, 161, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 255, 253, 0.94));
  border: 1px solid var(--line);
}

.quote-cover-stage,
.quote-total-stage {
  position: relative;
  overflow: hidden;
}

.quote-cover-stage::after,
.quote-total-stage::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(99, 242, 221, 0.1), rgba(99, 242, 221, 0.86), rgba(112, 172, 255, 0.14));
  animation: stripScan 5.2s linear infinite;
}

.quote-cover-band {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.quote-cover-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quote-cover-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(14, 128, 142, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #0d6877;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-document-shell {
  display: grid;
  gap: 16px;
}

.quote-cover-crest {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.quote-cover-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.quote-cover-note {
  display: grid;
  gap: 6px;
}

.quote-cover-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(18, 122, 132, 0.1);
  color: #0f6672;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quote-section-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.quote-group-number {
  width: 60px;
  min-height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 32%),
    linear-gradient(180deg, rgba(96, 245, 219, 0.2), rgba(112, 172, 255, 0.14));
  border: 1px solid rgba(17, 136, 149, 0.14);
  color: #0f6672;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.quote-section-copy {
  min-width: 0;
}

.quote-section-copy h4 {
  margin: 0;
}

.chart-card,
.crm-panel,
.detail-card,
.quote-layout > .stack > .card,
.product-workspace > .stack > .card,
.product-workspace > .card {
  box-shadow: var(--shadow);
}

.quote-summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.quote-summary-grid-primary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.quote-summary-grid-primary .summary-card {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 252, 251, 0.88));
}

.quote-summary-grid-secondary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.area-summary-card {
  position: relative;
  overflow: hidden;
}

.area-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(90, 240, 217, 0.8), rgba(84, 150, 255, 0.64));
}

.quote-summary-grid .summary-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.1;
}

.workbench-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(18, 122, 132, 0.12);
  background: rgba(244, 255, 253, 0.86);
}

.workbench-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.customer-workbench-fold .workbench-card,
.customer-analysis-fold .list-item,
.customer-assets-fold .list-item,
.customer-history-fold .history-item {
  background:
    linear-gradient(180deg, rgba(253, 255, 255, 0.98), rgba(240, 251, 250, 0.88));
}

.history-item {
  display: grid;
  gap: 6px;
}

.history-item + .history-item {
  padding-top: 12px;
  border-top: 1px dashed rgba(18, 122, 132, 0.16);
}

.mono {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  word-break: break-all;
}

.path-block {
  gap: 6px;
}

.backup-item {
  display: grid;
  gap: 10px;
}

.action-card {
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.action-card strong,
.action-card .muted,
.action-card .tiny-note {
  text-align: left;
}

.link-like {
  color: var(--accent-strong);
  font-weight: 700;
}

.product-group {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 255, 253, 0.9));
}

.crm-panel .list-item,
.detail-card .list-item,
.product-group .list-item,
.quote-layout .list-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-panel .list-item:hover,
.detail-card .list-item:hover,
.product-group .list-item:hover,
.quote-layout .list-item:hover {
  box-shadow: 0 18px 34px rgba(12, 62, 72, 0.08);
}

.product-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.catalog-finder-stage {
  display: grid;
  gap: 14px;
  padding: 16px 0 0;
}

.catalog-finder-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-guide-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-guide-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(18, 122, 132, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(253, 255, 255, 0.92), rgba(241, 252, 252, 0.78));
}

.catalog-guide-card > span {
  color: #0d7180;
  font-size: 12px;
  font-weight: 900;
}

.catalog-guide-card strong {
  color: #07323b;
  font-size: 19px;
}

.catalog-guide-card p,
.catalog-folder-actions span {
  margin: 0;
  color: #526f78;
  font-size: 13px;
  line-height: 1.55;
}

.catalog-folder-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.catalog-action-label {
  color: #315965;
  font-size: 13px;
  font-weight: 850;
}

.catalog-filter-path {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(18, 122, 132, 0.12);
  background: rgba(250, 255, 255, 0.9);
  color: #0f6877;
  font-size: 12px;
  font-weight: 700;
}

.catalog-filter-pill.active {
  background: linear-gradient(135deg, rgba(100, 245, 220, 0.18), rgba(117, 190, 255, 0.16));
  box-shadow: 0 12px 24px rgba(12, 79, 101, 0.08);
}

.catalog-quick-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.catalog-quick-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(18, 122, 132, 0.1);
  background:
    linear-gradient(180deg, rgba(253, 255, 255, 0.98), rgba(243, 252, 252, 0.9));
  color: #07323b;
  font-weight: 700;
  text-align: left;
  box-shadow: 0 16px 32px rgba(9, 69, 86, 0.08);
}

.catalog-quick-chip strong {
  font-size: 18px;
  color: #0d6a79;
}

.catalog-quick-chip.active {
  border-color: rgba(66, 228, 208, 0.28);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.44), transparent 34%),
    linear-gradient(135deg, rgba(97, 245, 220, 0.24), rgba(117, 190, 255, 0.18));
  box-shadow:
    0 22px 34px rgba(6, 71, 94, 0.14),
    0 0 28px rgba(88, 235, 220, 0.12);
}

.product-list-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px 0 2px;
}

.share-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.share-card {
  display: grid;
  gap: 10px;
}

.brand-share-card {
  align-content: start;
}

.brand-collab-board {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  align-items: start;
}

.brand-chip-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 112, 122, 0.1);
  border-radius: 18px;
  background: rgba(245, 253, 253, 0.58);
}

.brand-chip-group {
  display: grid;
  gap: 8px;
}

.brand-chip-group-title {
  color: #0f5963;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-chip-button {
  display: grid;
  min-width: 132px;
  max-width: 188px;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid rgba(24, 142, 152, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #12373e;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(8, 59, 70, 0.07);
}

.brand-chip-button:hover,
.brand-chip-button.active {
  border-color: rgba(16, 168, 184, 0.42);
  background: linear-gradient(135deg, rgba(230, 255, 252, 0.98), rgba(214, 244, 251, 0.9));
  box-shadow: 0 12px 24px rgba(8, 128, 145, 0.13);
}

.brand-chip-button strong,
.brand-chip-button span,
.brand-chip-button em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-chip-button strong {
  font-size: 13px;
}

.brand-chip-button span {
  color: rgba(31, 72, 80, 0.72);
  font-size: 11px;
}

.brand-chip-button em {
  color: #0d8791;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.brand-share-detail {
  align-content: start;
  min-height: 100%;
}

.brand-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.brand-status-line span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(12, 112, 126, 0.08);
  color: #14525c;
  font-size: 12px;
  font-weight: 800;
}

.brand-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.brand-action-grid .ghost-button,
.brand-action-grid .link-button {
  min-height: 36px;
  padding-inline: 10px;
}

.brand-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brand-scope-chips span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(18, 122, 132, 0.08);
  color: #0f5963;
  font-size: 12px;
  font-weight: 800;
}

.procurement-sync-card {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 0% 0%, rgba(84, 239, 216, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(252, 255, 255, 0.94), rgba(238, 250, 252, 0.82));
}

.summary-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 29, 35, 0.42);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: 0 28px 56px rgba(10, 35, 42, 0.22);
}

.panel > .stack,
.panel > .split,
.panel > .crm-board,
.panel > .quote-layout,
.panel > .dashboard-layout {
  align-items: start;
}

.large-modal {
  width: min(980px, calc(100vw - 32px));
}

.manual-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.manual-modal.hidden {
  display: none;
}

.manual-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 13, 20, 0.58);
  backdrop-filter: blur(10px);
}

.manual-dialog {
  position: relative;
  width: min(860px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 30px;
  border: 1px solid rgba(169, 255, 245, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(76, 238, 218, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(238, 253, 253, 0.94), rgba(217, 235, 239, 0.9));
  box-shadow:
    0 34px 90px rgba(0, 8, 14, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.manual-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 26px 18px;
  background: linear-gradient(180deg, rgba(236, 253, 253, 0.98), rgba(236, 253, 253, 0.82));
  backdrop-filter: blur(12px);
}

.manual-header h3 {
  margin: 4px 0 0;
  color: #062936;
  font-size: 28px;
  line-height: 1.2;
}

.manual-close-button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #06313b;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(12, 119, 136, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.manual-body {
  display: grid;
  gap: 16px;
  padding: 0 26px 26px;
  color: #123f4b;
}

.manual-summary {
  margin: 0;
  color: #426772;
  line-height: 1.65;
}

.manual-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(14, 126, 142, 0.12);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.manual-section h4 {
  margin: 0;
  color: #062936;
  font-size: 16px;
}

.manual-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manual-list li {
  position: relative;
  padding-left: 18px;
  color: #456b74;
  line-height: 1.55;
}

.manual-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #56f0d9, #148fa0);
  box-shadow: 0 0 14px rgba(51, 218, 202, 0.34);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 5000;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(620px, calc(100vw - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(112, 246, 229, 0.26);
  border-radius: 999px;
  color: white;
  background:
    radial-gradient(circle at 18% 10%, rgba(102, 245, 225, 0.32), transparent 34%),
    rgba(8, 42, 50, 0.96);
  opacity: 0;
  text-align: center;
  transform: translate(-50%, -18px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 18px 48px rgba(0, 14, 22, 0.34);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-10px, 12px, 0) scale(1.06);
  }
}

@keyframes driftAurora {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.08);
  }
}

@keyframes pulseAurora {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.08);
  }
}

@keyframes floatParticle {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.28;
  }
  50% {
    transform: translate3d(18px, -26px, 0);
    opacity: 0.8;
  }
}

@keyframes spinHalo {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulseCore {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.96);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes pulseBeam {
  0%,
  100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scaleY(0.94);
  }
  50% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scaleY(1.04);
  }
}

@keyframes brandPulse {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 18px 36px rgba(14, 125, 155, 0.28),
      0 0 42px rgba(77, 241, 219, 0.16);
  }
  50% {
    transform: translate3d(0, -2px, 0);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 22px 42px rgba(14, 125, 155, 0.34),
      0 0 56px rgba(77, 241, 219, 0.24);
  }
}

.review-warning-card {
  border-color: rgba(201, 135, 37, 0.24);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 255, 255, 0.94));
}

.review-ok-card {
  border-color: rgba(30, 147, 105, 0.2);
  background: linear-gradient(180deg, rgba(244, 255, 251, 0.96), rgba(255, 255, 255, 0.94));
}

.quote-status-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.quote-status-card > div:first-child {
  flex: 1 1 320px;
  min-width: min(100%, 260px);
}

.quote-status-actions {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  justify-content: end;
}

.quote-status-action-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(16, 130, 142, 0.1);
  border-radius: 12px;
  background: rgba(246, 253, 253, 0.72);
}

.quote-status-action-group:first-child {
  grid-template-columns: none;
}

.quote-status-actions .link-button,
.quote-status-action-button {
  width: auto;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: #075868;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  box-shadow: none;
  transform: none !important;
  white-space: nowrap;
}

.quote-status-primary-action {
  border-color: rgba(39, 213, 197, 0.34);
  color: #062b33;
  background:
    radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #6cf9e1, #20a5d8);
}

.quote-status-actions .link-button::after,
.quote-status-actions .link-button:hover::after,
.quote-status-action-button::after,
.quote-status-action-button:hover::after {
  display: none;
  content: none;
  animation: none;
}

.quote-status-idle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 252, 251, 0.88));
}

.quote-list-item {
  position: relative;
  overflow: hidden;
}

.quote-list-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(98, 244, 219, 0.72), rgba(91, 163, 255, 0.6));
}

.large-textarea {
  min-height: 180px;
}

.analysis-dropzone {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(18, 122, 132, 0.04);
}

.analysis-dropzone.drag-active {
  border-color: rgba(18, 122, 132, 0.42);
  background: rgba(18, 122, 132, 0.1);
}

.analysis-preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.analysis-thumb {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.analysis-thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 8px;
}

body[data-panel="dashboard"] .topbar {
  background:
    radial-gradient(circle at 0% 0%, rgba(82, 234, 215, 0.14), transparent 18%),
    radial-gradient(circle at 100% 0%, rgba(103, 160, 255, 0.14), transparent 20%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.72), rgba(239, 250, 251, 0.44));
}

.dashboard-hub {
  display: grid;
  gap: 18px;
}

.dashboard-hero-stage {
  position: relative;
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(113, 233, 225, 0.18);
  background:
    radial-gradient(circle at 6% 50%, rgba(78, 240, 216, 0.16), transparent 24%),
    radial-gradient(circle at 92% 48%, rgba(100, 152, 255, 0.14), transparent 22%),
    linear-gradient(145deg, rgba(6, 24, 35, 0.9), rgba(10, 31, 43, 0.82) 46%, rgba(6, 17, 28, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 64px rgba(0, 8, 16, 0.24),
    0 0 42px rgba(78, 216, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
}

.dashboard-hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.09) 18%, transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 36%);
  pointer-events: none;
}

.dashboard-hero-stage::after {
  content: "";
  position: absolute;
  inset: auto -12% -58% auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 240, 217, 0.2), transparent 66%);
  filter: blur(8px);
  animation: pulseAurora 14s ease-in-out infinite;
  pointer-events: none;
}

.dashboard-hero-copy,
.dashboard-core-visual {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy {
  display: grid;
  gap: 0;
  align-content: start;
}

.dashboard-hero-copy .eyebrow {
  margin-bottom: 0;
}

.dashboard-hero-copy h3 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: rgba(242, 253, 255, 0.98);
}

.dashboard-hero-copy p {
  margin: 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(195, 225, 231, 0.82);
}

.dashboard-signal-rack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-signal-main,
.dashboard-link-card,
.dashboard-module-card {
  position: relative;
  overflow: hidden;
}

.dashboard-signal-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "value label"
    "value note";
  align-items: center;
  column-gap: 16px;
  row-gap: 4px;
  min-width: 320px;
  padding: 13px 18px;
  border-radius: 20px;
  border: 1px solid rgba(110, 237, 227, 0.18);
  background:
    radial-gradient(circle at top left, rgba(75, 236, 214, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 6, 10, 0.18);
}

.dashboard-signal-main strong {
  grid-area: value;
  font-size: 44px;
  line-height: 1;
  color: white;
}

.dashboard-signal-main .tiny-note {
  grid-area: label;
}

.dashboard-signal-main .muted {
  grid-area: note;
  color: rgba(195, 225, 231, 0.76);
}

.dashboard-signal-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-content: start;
}

.dashboard-signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(118, 239, 230, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(220, 251, 250, 0.86);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-primary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 0;
}

.dashboard-cta {
  min-height: 50px;
  padding-inline: 24px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 900;
  color: #062b33;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.78), transparent 22%),
    linear-gradient(135deg, #6ff9dc, #16a8d7 72%);
  box-shadow:
    0 16px 34px rgba(27, 204, 218, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.dashboard-cta.secondary {
  border: 1px solid rgba(115, 240, 231, 0.18);
  color: rgba(229, 253, 251, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 6, 10, 0.18);
}

.dashboard-cta:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    0 22px 42px rgba(27, 204, 218, 0.28),
    0 0 26px rgba(100, 239, 221, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.dashboard-core-visual {
  min-height: 420px;
  border-radius: 30px;
  border: 1px solid rgba(120, 241, 228, 0.12);
  background:
    radial-gradient(circle at 50% 50%, rgba(76, 239, 213, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(7, 19, 29, 0.9), rgba(6, 14, 24, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 72px rgba(71, 215, 255, 0.08),
    0 24px 48px rgba(0, 5, 10, 0.24);
  overflow: hidden;
}

.dashboard-core-ring,
.dashboard-core-shell,
.dashboard-core-beam,
.dashboard-core-dot,
.dashboard-core-tag {
  position: absolute;
}

.dashboard-core-ring {
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(118, 243, 230, 0.18);
}

.dashboard-core-ring.ring-a {
  width: 260px;
  height: 260px;
  animation: spinHalo 22s linear infinite;
}

.dashboard-core-ring.ring-b {
  width: 196px;
  height: 196px;
  border-style: dashed;
  animation: spinHalo 15s linear infinite reverse;
}

.dashboard-core-ring.ring-c {
  width: 118px;
  height: 118px;
  animation: spinHalo 9s linear infinite;
}

.dashboard-core-shell {
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  transform: translate(-50%, -50%) rotate(45deg);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(135deg, rgba(91, 239, 220, 0.98), rgba(17, 137, 156, 0.92) 52%, rgba(25, 77, 194, 0.88));
  box-shadow:
    0 0 0 12px rgba(76, 236, 214, 0.08),
    0 0 38px rgba(76, 239, 222, 0.32),
    0 0 72px rgba(92, 167, 255, 0.24);
  animation: dashboardCorePulse 4.4s ease-in-out infinite;
}

.dashboard-core-beam {
  left: 50%;
  top: 50%;
  width: 2px;
  height: 84%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, transparent, rgba(97, 231, 214, 0.46), rgba(94, 166, 255, 0.42), transparent);
}

.dashboard-core-dot {
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98), rgba(108, 253, 238, 0.9) 48%, transparent 72%);
  box-shadow:
    0 0 24px rgba(87, 245, 220, 0.36),
    0 0 44px rgba(96, 174, 255, 0.2);
}

.dashboard-core-tag {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 19, 30, 0.72);
  color: rgba(220, 252, 249, 0.88);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(0, 6, 10, 0.2);
}

.dashboard-core-tag.tag-a {
  left: 28px;
  top: 34px;
}

.dashboard-core-tag.tag-b {
  right: 24px;
  top: 118px;
}

.dashboard-core-tag.tag-c {
  left: 36px;
  bottom: 28px;
}

.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-module-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 18px;
  row-gap: 14px;
  min-height: 168px;
  padding: 20px;
  border: 1px solid rgba(112, 236, 227, 0.18);
  border-radius: 24px;
  text-align: left;
  color: inherit;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 155, 255, 0.18), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(76, 240, 214, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.9), rgba(231, 246, 248, 0.74));
  box-shadow:
    0 20px 42px rgba(0, 12, 18, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  animation: tileFloat 10s ease-in-out infinite;
}

.dashboard-module-card:nth-child(2) { animation-delay: -1.4s; }
.dashboard-module-card:nth-child(3) { animation-delay: -2.8s; }
.dashboard-module-card:nth-child(4) { animation-delay: -4.2s; }
.dashboard-module-card:nth-child(5) { animation-delay: -5.6s; }
.dashboard-module-card:nth-child(6) { animation-delay: -7s; }
.dashboard-module-card:nth-child(7) { animation-delay: -8.4s; }

.dashboard-module-card::before,
.dashboard-link-card::before,
button::after,
.ghost-button::after,
.link-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dashboard-module-card::before,
.dashboard-link-card::before {
  background: linear-gradient(118deg, transparent 0%, rgba(255, 255, 255, 0.28) 24%, transparent 40%);
  transform: translateX(-120%);
  opacity: 0;
}

button,
.ghost-button,
.link-button {
  position: relative;
  overflow: hidden;
}

button::after,
.ghost-button::after,
.link-button::after {
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.34) 28%, transparent 46%);
  transform: translateX(-140%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.dashboard-module-card:hover,
.dashboard-link-card:hover {
  transform: translateY(-7px);
  border-color: rgba(64, 228, 218, 0.42);
  box-shadow:
    0 34px 72px rgba(0, 12, 18, 0.24),
    0 0 34px rgba(86, 202, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-module-card:hover::before,
.dashboard-link-card:hover::before,
button:hover::after,
.ghost-button:hover::after,
.link-button:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

.dashboard-module-index {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(15, 143, 149, 0.18);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.74), transparent 26%),
    linear-gradient(145deg, rgba(95, 228, 216, 0.22), rgba(32, 110, 148, 0.12));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #087987;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 12px 26px rgba(6, 41, 50, 0.1);
}

.dashboard-module-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.dashboard-module-kicker,
.dashboard-link-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f8f95;
}

.dashboard-module-body h4 {
  margin: 0;
  font-size: 27px;
  line-height: 1.04;
  color: #06242d;
}

.dashboard-module-body p,
.dashboard-link-card span:last-child {
  margin: 0;
  line-height: 1.65;
  color: #51707a;
}

.dashboard-module-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  grid-column: 2;
}

.dashboard-module-meta {
  font-size: 13px;
  color: #2b626d;
}

.dashboard-module-enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px 7px 12px;
  border-radius: 999px;
  background: rgba(15, 143, 149, 0.1);
  color: #0a8d94;
  font-weight: 800;
  letter-spacing: 0.08em;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.dashboard-module-enter::after {
  content: ">";
  font-size: 13px;
  line-height: 1;
  transition: transform 0.22s ease;
}

.dashboard-module-card:hover .dashboard-module-enter {
  background: rgba(15, 143, 149, 0.16);
  color: #047a83;
  transform: translateX(2px);
}

.dashboard-module-card:hover .dashboard-module-enter::after {
  transform: translateX(3px);
}

.dashboard-link-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-link-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 26px;
  border: 1px solid rgba(113, 235, 225, 0.14);
  background:
    linear-gradient(180deg, rgba(246, 255, 255, 0.82), rgba(236, 247, 248, 0.66));
  box-shadow:
    0 22px 48px rgba(0, 12, 18, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dashboard-link-card strong {
  font-size: 20px;
  color: #06262f;
}

.dashboard-data-cache {
  display: none;
}

.panel.active .dashboard-hero-stage {
  animation: stageReveal 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel.active .dashboard-module-card {
  animation: tileReveal 0.54s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel.active .dashboard-module-card:nth-child(2) {
  animation-delay: 0.04s;
}

.panel.active .dashboard-module-card:nth-child(3) {
  animation-delay: 0.08s;
}

.panel.active .dashboard-module-card:nth-child(4) {
  animation-delay: 0.12s;
}

.panel.active .dashboard-module-card:nth-child(5) {
  animation-delay: 0.16s;
}

.panel.active .dashboard-module-card:nth-child(6) {
  animation-delay: 0.2s;
}

.panel.active .dashboard-module-card:nth-child(7) {
  animation-delay: 0.24s;
}

.panel.active .workspace-strip,
.panel.active .workspace-rail,
.panel.active .workspace-stage,
.panel.active .workspace-inspector,
.panel.active .quote-foundation-card,
.panel.active .quote-builder-card,
.panel.active .quote-preview-card,
.panel.active .quote-library-card,
.panel.active .catalog-search-card,
.panel.active .catalog-grid-card,
.panel.active .catalog-list-card,
.panel.active .catalog-editor-card,
.panel.active #brandWorkspace .card,
.panel.active #contentWorkspace .card,
.panel.active #knowledgeWorkspace .card,
.panel.active #logsWorkspace .card {
  animation: tileReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.procurement-action-card.procurement-scope-active {
  align-self: start;
}

#orderForm[hidden] {
  display: none !important;
}

.procurement-brief {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(17, 139, 146, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(232, 248, 249, 0.78)),
    radial-gradient(circle at 100% 0%, rgba(75, 198, 210, 0.16), transparent 32%);
  container-type: inline-size;
}

.procurement-brief-head,
.procurement-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.procurement-brief-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 190px;
}

.procurement-customer-switcher {
  display: grid;
  gap: 5px;
  min-width: 190px;
  color: #496a73;
  font-size: 12px;
  font-weight: 800;
}

.procurement-customer-switcher select {
  min-height: 36px;
  border-radius: 12px;
  font-size: 13px;
}

.procurement-picker-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.aftersales-editor-card .empty-state {
  margin-top: 8px;
}

.aftersales-customer-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(17, 139, 146, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 254, 253, 0.94), rgba(239, 248, 255, 0.86));
}

.aftersales-customer-panel h3 {
  margin: 2px 0 4px;
}

.aftersales-customer-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 220px;
}

.procurement-brief-head h3,
.procurement-detail-head h3 {
  margin: 2px 0 4px;
}

.procurement-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.procurement-brief-grid > div,
.procurement-contact-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(12, 102, 112, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.procurement-brief-grid span,
.procurement-contact-box div,
.procurement-copy-source {
  color: #5d7780;
  font-size: 13px;
  line-height: 1.5;
}

.procurement-brief-grid strong {
  color: #0b3741;
  font-size: 20px;
}

.procurement-workbench {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.procurement-brand-rail,
.procurement-brand-detail {
  min-width: 0;
}

.procurement-brand-list {
  display: grid;
  gap: 10px;
}

.procurement-brand-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(13, 112, 122, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: #0b3741;
  text-align: left;
  box-shadow: none;
}

.procurement-brand-button.active {
  border-color: rgba(15, 143, 149, 0.42);
  background: linear-gradient(135deg, rgba(226, 252, 249, 0.95), rgba(235, 246, 255, 0.9));
  box-shadow: 0 14px 32px rgba(6, 56, 68, 0.12);
}

.procurement-brand-button span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.procurement-brand-button small {
  color: #63808a;
  font-size: 12px;
}

.procurement-brand-button em {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 800;
  color: #0d6972;
}

.procurement-brand-detail {
  display: grid;
  gap: 14px;
  container-type: inline-size;
}

.procurement-status-row,
.procurement-bulk-actions,
.procurement-selection-bar .file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.procurement-selection-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(14, 116, 125, 0.14);
  border-radius: 14px;
  background: rgba(246, 254, 254, 0.72);
}

.procurement-selection-bar > div:first-child {
  display: grid;
  gap: 2px;
}

.procurement-copy-source {
  display: none;
}

.procurement-item-list {
  display: grid;
  gap: 10px;
  container-type: inline-size;
}

.procurement-item-card {
  display: grid;
  grid-template-columns: auto minmax(min(100%, 24rem), 1fr) minmax(max-content, auto);
  gap: 10px 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(8, 77, 87, 0.12);
  container-type: inline-size;
}

.procurement-item-card.selected {
  margin-inline: -10px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 143, 149, 0.24);
  background: rgba(231, 252, 249, 0.66);
}

.procurement-item-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #476772;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.procurement-item-select input {
  width: 16px;
  height: 16px;
  accent-color: #0c99a3;
}

.procurement-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.procurement-item-main strong,
.procurement-item-main .tiny-note {
  overflow-wrap: anywhere;
}

.procurement-item-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
  color: #4f6d76;
  font-size: 13px;
}

.procurement-price-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: 8px;
  grid-column: 2 / -1;
}

.procurement-price-editor label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #54737c;
  font-size: 12px;
  font-weight: 800;
}

.procurement-price-editor input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

.procurement-item-actions {
  grid-column: 2 / -1;
  justify-content: flex-start;
}

@container (max-width: 760px) {
  .procurement-item-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
  }

  .procurement-item-main {
    grid-column: 2;
  }

  .procurement-item-facts {
    grid-column: 2;
    justify-content: flex-start;
  }

  .procurement-price-editor,
  .procurement-item-actions {
    grid-column: 1 / -1;
  }
}

@container (max-width: 520px) {
  .procurement-item-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-item-select,
  .procurement-item-main,
  .procurement-item-facts,
  .procurement-price-editor,
  .procurement-item-actions {
    grid-column: 1 / -1;
  }

  .procurement-item-card {
    gap: 8px;
  }

  .procurement-price-editor {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  }

  .procurement-item-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
  }

  .procurement-item-actions .ghost-button {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .procurement-workbench {
    grid-template-columns: 1fr;
  }

  .procurement-brief-grid {
    grid-template-columns: 1fr;
  }

  .procurement-item-card {
    grid-template-columns: 1fr;
  }

  .procurement-item-facts {
    justify-content: flex-start;
  }

  .procurement-item-actions {
    grid-column: 1 / -1;
  }

  .procurement-price-editor {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .procurement-selection-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .procurement-brief-head,
  .procurement-detail-head {
    flex-direction: column;
  }

  .procurement-brief-actions,
  .procurement-customer-switcher,
  .aftersales-customer-actions {
    justify-items: stretch;
    width: 100%;
  }

  .aftersales-customer-panel {
    flex-direction: column;
  }

  .brand-action-grid {
    grid-template-columns: 1fr;
  }

  .brand-collab-board {
    grid-template-columns: 1fr;
  }

  .brand-chip-button {
    flex: 1 1 140px;
  }
}

.panel-shell {
  display: grid;
  gap: 20px;
}

.workspace-strip {
  position: relative;
  display: none;
  grid-template-columns: minmax(0, 1.16fr) auto;
  gap: 18px 24px;
  align-items: start;
  padding: 24px 26px;
  border: 1px solid rgba(117, 234, 225, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(70, 238, 214, 0.14), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(103, 160, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.86), rgba(239, 250, 250, 0.68));
  box-shadow:
    0 30px 70px rgba(0, 10, 16, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
  overflow: hidden;
}

.workspace-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0%, rgba(255, 255, 255, 0.32) 14%, transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 34%);
  animation: sheenSweep 10s linear infinite;
  pointer-events: none;
}

.workspace-strip::after {
  content: "";
  position: absolute;
  inset: auto 8% 12px auto;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(130, 255, 239, 0.86), transparent);
  filter: blur(0.3px);
  animation: stripScan 4.4s linear infinite;
  pointer-events: none;
}

.workspace-strip-copy,
.workspace-strip-meta {
  position: relative;
  z-index: 1;
}

.workspace-strip-copy {
  display: grid;
  gap: 8px;
}

.workspace-strip-copy h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.24;
  color: #072830;
}

.workspace-strip-copy p {
  margin: 0;
  max-width: 760px;
  color: #4d6d76;
}

.workspace-strip-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
}

.workspace-strip-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 129, 141, 0.14);
  background: rgba(255, 255, 255, 0.62);
  color: #0b5c69;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.crm-strip {
  background:
    radial-gradient(circle at 10% 0%, rgba(74, 238, 214, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(105, 154, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(237, 248, 249, 0.72));
}

.quote-strip {
  background:
    radial-gradient(circle at 12% 0%, rgba(80, 223, 255, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(66, 243, 198, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(238, 249, 250, 0.72));
}

.product-strip {
  background:
    radial-gradient(circle at 12% 0%, rgba(72, 241, 205, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(106, 127, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(238, 248, 250, 0.72));
}

.brand-strip {
  background:
    radial-gradient(circle at 12% 0%, rgba(66, 226, 188, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(93, 189, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(236, 249, 248, 0.72));
}

.content-strip {
  background:
    radial-gradient(circle at 12% 0%, rgba(102, 209, 255, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(93, 239, 209, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(237, 248, 250, 0.72));
}

.knowledge-strip {
  background:
    radial-gradient(circle at 12% 0%, rgba(97, 242, 214, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(124, 172, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(239, 250, 249, 0.72));
}

.logs-strip {
  background:
    radial-gradient(circle at 12% 0%, rgba(88, 215, 255, 0.18), transparent 24%),
    radial-gradient(circle at 100% 10%, rgba(74, 236, 203, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.88), rgba(238, 248, 250, 0.72));
}

#panel-customers .crm-board,
#panel-quotes .quote-layout,
#panel-products .product-workspace {
  gap: 20px;
}

.workspace-rail,
.workspace-stage,
.workspace-inspector,
.quote-foundation-card,
.quote-builder-card,
.quote-preview-card,
.quote-library-card,
.catalog-search-card,
.catalog-grid-card,
.catalog-list-card,
.catalog-editor-card {
  border-radius: 28px;
}

.workspace-rail,
.quote-foundation-card,
.quote-builder-card,
.catalog-search-card,
.catalog-grid-card,
.catalog-list-card {
  background:
    linear-gradient(180deg, rgba(249, 255, 255, 0.92), rgba(240, 251, 251, 0.78));
}

.workspace-stage,
.quote-preview-card,
.catalog-editor-card {
  background:
    radial-gradient(circle at top right, rgba(70, 231, 213, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(95, 169, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(252, 255, 255, 0.96), rgba(242, 252, 251, 0.84));
  box-shadow:
    0 34px 86px rgba(0, 10, 16, 0.22),
    0 0 34px rgba(87, 212, 255, 0.06);
}

.workspace-inspector,
.quote-library-card {
  background:
    radial-gradient(circle at top right, rgba(82, 216, 255, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(246, 255, 255, 0.94), rgba(236, 247, 248, 0.82));
}

.workspace-rail:hover,
.workspace-stage:hover,
.workspace-inspector:hover,
.quote-foundation-card:hover,
.quote-builder-card:hover,
.quote-preview-card:hover,
.quote-library-card:hover,
.catalog-search-card:hover,
.catalog-grid-card:hover,
.catalog-list-card:hover,
.catalog-editor-card:hover {
  transform: none;
}

.workspace-inspector,
.quote-preview-card,
.catalog-editor-card {
  position: sticky;
  top: 118px;
  z-index: 3;
}

.workspace-rail .section-head,
.workspace-stage .section-head,
.workspace-inspector .section-head,
.quote-foundation-card .section-head,
.quote-builder-card .section-head,
.quote-preview-card .section-head,
.catalog-search-card .section-head,
.catalog-grid-card .section-head,
.catalog-editor-card .section-head {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom-color: rgba(16, 130, 142, 0.12);
}

.quote-action-groups {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: end;
  width: auto;
  max-width: 100%;
}

.quote-preview-card button,
.quote-preview-card .ghost-button,
.quote-preview-card .link-button,
.quote-preview-card .deal-button {
  transform: none !important;
  transform-style: flat;
  animation: none;
}

.quote-preview-card button::after,
.quote-preview-card .ghost-button::after,
.quote-preview-card .link-button::after,
.quote-preview-card .deal-button::after,
.quote-preview-card button:hover::after,
.quote-preview-card .ghost-button:hover::after,
.quote-preview-card .link-button:hover::after,
.quote-preview-card .deal-button:hover::after {
  display: none !important;
  content: none;
  animation: none;
}

.quote-preview-card .interactive-surface.tilt-active {
  transform: none !important;
}

.quote-switcher-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  background:
    radial-gradient(circle at top right, rgba(77, 239, 218, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(235, 249, 249, 0.72));
}

.quote-switcher-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.quote-switcher-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.quote-switcher-button {
  display: grid;
  justify-content: stretch;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  color: #0a4652;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.quote-switcher-button span,
.quote-switcher-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-switcher-button small {
  color: #5f7c84;
  font-size: 12px;
  font-weight: 700;
}

.quote-switcher-button.active {
  border-color: rgba(35, 199, 184, 0.38);
  color: #05313a;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.68), transparent 32%),
    linear-gradient(135deg, rgba(105, 246, 225, 0.86), rgba(205, 244, 255, 0.82));
}

.quote-action-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(236, 250, 250, 0.44));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.quote-preview-card > .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 12px;
}

.quote-preview-card > .section-head > div:first-child {
  flex: 1 1 260px;
  min-width: min(100%, 260px);
}

.quote-action-group-view,
.quote-action-group-draft,
.quote-action-group-submit {
  grid-template-columns: none;
}

.quote-action-group-service {
  grid-template-columns: none;
}

.quote-action-group-draft #clearCurrentConfigButton {
  grid-column: auto;
  justify-self: auto;
}

.quote-action-label {
  grid-column: auto;
}

.quote-action-group-submit {
  background:
    radial-gradient(circle at 0% 0%, rgba(77, 239, 218, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(230, 249, 248, 0.48));
}

.quote-action-label {
  padding: 0 4px;
  color: #3f6a73;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-chip-button,
.quote-primary-action,
.quote-confirm-action {
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 10.5px;
  box-shadow: none;
  transform: none !important;
  transform-style: flat;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.quote-action-groups button::after,
.quote-action-groups button:hover::after {
  display: none;
  content: none;
  animation: none;
}

.quote-chip-button {
  color: #075868;
  border: 1px solid rgba(16, 130, 142, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.quote-chip-button:hover {
  border-color: rgba(16, 130, 142, 0.24);
  background: rgba(255, 255, 255, 0.92);
}

.quote-chip-button.active-toggle {
  color: #04313a;
  border-color: rgba(39, 213, 197, 0.36);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.62), transparent 32%),
    linear-gradient(135deg, rgba(106, 247, 226, 0.92), rgba(64, 166, 220, 0.82));
}

.quote-chip-button.danger-soft {
  color: #8c3a3a;
  background: rgba(255, 245, 245, 0.8);
  border-color: rgba(216, 101, 101, 0.18);
}

.quote-chip-button.danger-soft:hover {
  background: rgba(255, 237, 237, 0.96);
  border-color: rgba(216, 101, 101, 0.32);
}

.quote-delete-button {
  color: #8c3a3a;
  border-color: rgba(216, 101, 101, 0.2);
  background: rgba(255, 245, 245, 0.82);
}

.quote-primary-action,
.quote-confirm-action {
  color: #062b33;
  background:
    radial-gradient(circle at 22% 14%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #6cf9e1, #20a5d8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 10px 20px rgba(11, 121, 158, 0.2);
}

.quote-confirm-action {
  background:
    radial-gradient(circle at 22% 14%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #c9fff1, #6edb9a);
}

.crm-panel .crm-filter-grid {
  margin-bottom: 16px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(18, 122, 132, 0.1);
  border-radius: 0;
  background: transparent;
}

.crm-side-sections > div {
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(18, 122, 132, 0.08);
  border-radius: 0;
  background: transparent;
}

.workspace-stage {
  min-height: 820px;
}

.workspace-inspector {
  min-height: 820px;
}

.workspace-stage > *,
.workspace-inspector > * {
  position: relative;
  z-index: 1;
}

.quote-layout {
  grid-template-columns: minmax(min(100%, 340px), 0.9fr) minmax(0, 1.1fr);
}

.quote-layout[data-quote-workspace-mode="library"] {
  grid-template-columns: minmax(0, 1fr);
}

.quote-layout[data-quote-workspace-mode="deliver"] .quote-preview-column,
.quote-layout[data-quote-workspace-mode="library"] .quote-preview-column {
  max-width: none;
  width: 100%;
}

.quote-layout[data-quote-workspace-mode="library"] .quote-library-card {
  width: 100%;
}

.quote-builder-column,
.quote-preview-column,
.catalog-stage-column {
  gap: 18px;
}

.quote-foundation-card .form-grid,
.quote-builder-card .form-grid {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quote-foundation-card .field-combo,
.quote-builder-card .field-combo {
  align-items: stretch;
}

.quote-custom-actions {
  justify-content: stretch;
}

.quote-custom-actions button {
  flex: 1 1 180px;
}

.area-board {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.area-chip {
  min-height: 112px;
  display: grid;
  gap: 8px;
  align-content: start;
  border-radius: 20px;
}

.area-selected-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 130, 142, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(105, 246, 225, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(235, 250, 249, 0.62));
}

.area-selected-main {
  min-width: 0;
}

.area-selected-main strong {
  display: block;
  color: #083d49;
  font-size: 15px;
}

.area-selected-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

#quoteBranchFilters {
  padding: 10px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#quoteFilterHint {
  min-height: 18px;
}

.quote-preview-card #quoteDraftStatus {
  gap: 12px;
}

.quote-followup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quote-preview-card #quoteDraft {
  gap: 14px;
}

.quote-preview-card .quote-group,
.quote-preview-card .summary-card,
.quote-preview-card .detail-card-block {
  background: rgba(251, 255, 255, 0.88);
}

.catalog-search-card .form-grid {
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(18, 122, 132, 0.08);
  border-radius: 0;
  background: transparent;
}

.catalog-grid-card .product-grid-filters {
  margin-top: 0;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(18, 122, 132, 0.08);
  border-radius: 0;
  background: transparent;
}

.product-grid-shell {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(250, 255, 255, 0.9), rgba(241, 251, 251, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.product-grid-table {
  min-height: 220px;
}

.product-grid-table .table-grid {
  min-width: 1280px;
}

.catalog-editor-card #productForm {
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(18, 122, 132, 0.1);
  border-radius: 0;
  background: transparent;
  align-items: start;
}

.catalog-editor-card #productForm .field-block {
  min-width: 0;
}

.catalog-editor-card #productForm .field-block input,
.catalog-editor-card #productForm .field-block textarea {
  width: 100%;
}

.catalog-editor-card .inner-stack {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(18, 122, 132, 0.12);
}

.catalog-editor-card[data-product-workspace-mode="browse"] .catalog-rule-stack,
.catalog-editor-card[data-product-workspace-mode="grid"] .catalog-rule-stack {
  display: none;
}

.catalog-rule-stack {
  gap: 18px;
}

.rule-guide-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(18, 122, 132, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 8%, rgba(93, 239, 222, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(229, 249, 250, 0.74));
}

.rule-guide-main {
  display: grid;
  gap: 8px;
  align-content: start;
}

.rule-guide-label,
.rule-explain-card span {
  color: #0d7f8c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.rule-guide-main strong,
.rule-explain-card strong {
  color: #072f38;
  font-size: 18px;
}

.rule-guide-main p,
.rule-explain-card p,
.rule-form-copy p {
  margin: 0;
  color: #45656f;
  line-height: 1.7;
}

.rule-guide-steps {
  display: grid;
  gap: 8px;
}

.rule-guide-steps div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(18, 122, 132, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.rule-guide-steps b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #05323a;
  background: linear-gradient(135deg, #6cf8e1, #8fd8ff);
}

.rule-guide-steps span {
  color: #31535d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.rule-explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rule-explain-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(18, 122, 132, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
}

.rule-file-details {
  display: grid;
  gap: 8px;
}

.rule-file-details summary {
  cursor: pointer;
  color: #0b6976;
  font-weight: 900;
}

.product-master-sync-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.product-master-sync-card > div:first-child {
  display: grid;
  gap: 5px;
}

.warn-soft {
  border-color: rgba(207, 137, 45, 0.24) !important;
  color: #8a5b11 !important;
  background: rgba(255, 248, 230, 0.88) !important;
}

.rule-section-head {
  margin-top: 2px;
}

.rule-form-card,
.saved-rule-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(18, 122, 132, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(113, 210, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(239, 252, 251, 0.68));
}

.rule-form-copy {
  display: grid;
  gap: 6px;
}

.rule-form-copy h3 {
  margin: 0;
}

.rule-form-card #productRuleForm {
  padding: 0;
  border: 0;
  background: transparent;
}

.catalog-editor-card .list.compact-list,
.catalog-list-card .list,
.workspace-rail .compact-list,
.quote-library-card .list {
  gap: 12px;
}

@keyframes stageReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tileReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboardCorePulse {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(45deg) scale(0.96);
  }
  50% {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.06);
  }
}

@keyframes navPulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 18px 30px rgba(4, 18, 25, 0.24),
      0 0 28px rgba(65, 231, 208, 0.12);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 22px 38px rgba(4, 18, 25, 0.28),
      0 0 38px rgba(65, 231, 208, 0.22);
  }
}

@keyframes sheenSweep {
  0% {
    transform: translateX(-16%);
    opacity: 0.24;
  }
  50% {
    transform: translateX(0);
    opacity: 0.64;
  }
  100% {
    transform: translateX(16%);
    opacity: 0.24;
  }
}

@keyframes tileFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes buttonSweep {
  0% {
    transform: translateX(-20%) rotate(18deg);
    opacity: 0;
  }
  12% {
    opacity: 0.56;
  }
  28%,
  100% {
    transform: translateX(260%) rotate(18deg);
    opacity: 0;
  }
}

@keyframes stripScan {
  0% {
    transform: translateX(28px);
    opacity: 0.18;
  }
  50% {
    transform: translateX(-18px);
    opacity: 0.92;
  }
  100% {
    transform: translateX(28px);
    opacity: 0.18;
  }
}

.assistant-shell {
  container-type: inline-size;
  container-name: assistant-shell;
}

.assistant-commandbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-10);
  align-items: end;
  padding: var(--ds-space-10) var(--ds-space-11);
  border: 1px solid rgba(104, 220, 255, 0.22);
  border-radius: var(--ds-radius-stage);
  background:
    radial-gradient(circle at 8% 0%, rgba(84, 239, 216, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(7, 49, 66, 0.94), rgba(3, 22, 33, 0.9));
  box-shadow: var(--ds-shadow-card), var(--ds-shadow-inset);
  color: rgba(245, 255, 255, 0.92);
}

.assistant-commandbar h3 {
  margin: 5px 0 7px;
  max-width: 820px;
  color: #f3ffff;
  font-size: clamp(22px, 2vw, 30px);
}

.assistant-commandbar p {
  margin: 0;
  max-width: 900px;
  color: rgba(220, 248, 248, 0.72);
}

.assistant-commandbar-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(84, 239, 216, 0.22);
  border-radius: var(--ds-radius-pill);
  background: rgba(5, 28, 38, 0.56);
  color: rgba(224, 255, 248, 0.88);
  font-size: var(--ds-text-sm);
  font-weight: 800;
  white-space: nowrap;
}

.assistant-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ds-mint);
  box-shadow: 0 0 14px rgba(84, 239, 216, 0.68);
}

.assistant-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: var(--ds-space-4);
}

.assistant-metric-card {
  min-height: 108px;
  padding: 18px 20px;
  overflow: hidden;
}

.assistant-metric-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  border-radius: var(--ds-radius-pill) var(--ds-radius-pill) 0 0;
  background: var(--ds-accent-strong);
  opacity: 0.26;
}

.assistant-metric-warn::after { background: var(--ds-warn); opacity: 0.75; }
.assistant-metric-ok::after { background: var(--ds-ok); opacity: 0.72; }
.assistant-metric-danger::after { background: var(--ds-danger); opacity: 0.72; }
.assistant-metric-accent::after { background: var(--ds-brand-blue); opacity: 0.48; }

.assistant-metric-card .metric-value {
  margin: 4px 0 2px;
  font-size: clamp(30px, 3vw, 42px);
}

.clickable {
  cursor: pointer;
}

.assistant-mode-row {
  display: flex;
  align-self: start;
  width: 100%;
  max-width: 100%;
  padding: 6px;
  gap: 5px;
  border: 1px solid rgba(104, 220, 255, 0.16);
  border-radius: var(--ds-radius-nav);
  background: rgba(4, 28, 40, 0.72);
  overflow-x: auto;
}

.assistant-mode-row .ghost-button {
  flex: 0 0 auto;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: rgba(220, 248, 248, 0.72);
}

.assistant-mode-row .ghost-button.active-toggle {
  border-color: rgba(84, 239, 216, 0.22);
  background: rgba(84, 239, 216, 0.12);
  color: #e7fffa;
}

.pager-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 10px 0 0;
  color: var(--muted);
}

.pager-row button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.reminder-group {
  display: grid;
  gap: 10px;
}

.assistant-shell[data-assistant-workspace-mode="review"] [data-assistant-workspace-view]:not([data-assistant-workspace-view~="review"]),
.assistant-shell[data-assistant-workspace-mode="automation"] [data-assistant-workspace-view]:not([data-assistant-workspace-view~="automation"]),
.assistant-shell[data-assistant-workspace-mode="work"] [data-assistant-workspace-view]:not([data-assistant-workspace-view~="work"]) {
  display: none !important;
}

.assistant-workspace[data-assistant-workspace-mode="review"],
.assistant-workspace[data-assistant-workspace-mode="automation"],
.assistant-workspace[data-assistant-workspace-mode="work"] {
  grid-template-columns: 1fr;
}

.workflow-hub-card {
  border-color: rgba(15, 127, 144, 0.14);
  background:
    radial-gradient(circle at 8% 0%, rgba(84, 239, 216, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(248, 255, 254, 0.94), rgba(229, 247, 250, 0.9));
}

.workflow-hub-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.workflow-hub-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 127, 144, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ds-muted);
}

.workflow-hub-pill span {
  font-size: 12px;
}

.workflow-hub-pill strong {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 20px;
  color: var(--accent);
}

.workflow-hub-pill-danger strong {
  color: #ff9c7c;
}

.workflow-hub-pill-warn strong {
  color: #f3c96b;
}

.workflow-hub-pill-ok strong {
  color: #7df2be;
}

.workflow-hub-list {
  display: grid;
  gap: 10px;
}

.workflow-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 127, 144, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(32, 206, 205, 0.08), transparent 48%),
    rgba(255, 255, 255, 0.54);
  box-shadow: var(--ds-shadow-inset);
}

.workflow-item-danger {
  border-color: rgba(255, 145, 94, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 129, 79, 0.1), transparent 54%),
    rgba(255, 248, 242, 0.8);
}

.workflow-item-muted {
  opacity: 0.86;
}

.workflow-item-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.workflow-item-main strong {
  color: var(--ink);
}

.workflow-item-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.workflow-item-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ds-accent-strong);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-item-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 8px;
  min-width: 180px;
}

.workflow-actions {
  justify-content: flex-end;
}

.assistant-workspace {
  align-items: start;
}

.assistant-decision-surface {
  padding: clamp(18px, 2vw, 26px);
  background:
    radial-gradient(circle at 100% 0%, rgba(125, 220, 255, 0.12), transparent 32%),
    linear-gradient(160deg, rgba(251, 255, 255, 0.96), rgba(231, 248, 249, 0.9));
}

.assistant-tools-drawer {
  border: 1px solid rgba(15, 127, 144, 0.14);
  border-radius: var(--ds-radius-card);
  background: rgba(240, 251, 252, 0.72);
  color: var(--ds-ink);
  overflow: hidden;
}

.assistant-tools-drawer summary {
  padding: 15px 18px;
  color: var(--ds-accent-strong);
  font-weight: 800;
  cursor: pointer;
}

.assistant-tools-drawer-body {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.assistant-code-block {
  padding: 14px 16px;
  border: 1px solid rgba(16, 129, 141, 0.14);
  border-radius: 18px;
  background: rgba(3, 18, 27, 0.88);
  color: #d8fffa;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  word-break: break-all;
}

.assistant-flow-list,
.assistant-record-meta,
.assistant-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.assistant-flow-list span,
.assistant-record-meta span,
.assistant-timeline span,
.assistant-next-action {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(16, 129, 141, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #0b5c69;
  font-size: 12px;
}

.assistant-record-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 127, 144, 0.12);
  border-radius: var(--ds-radius-card);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--ds-shadow-sm), var(--ds-shadow-inset);
}

.assistant-record-review {
  border-color: rgba(197, 140, 38, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 250, 230, 0.84), rgba(245, 255, 252, 0.68));
}

.assistant-record-applied {
  border-color: rgba(27, 154, 111, 0.2);
  background:
    linear-gradient(90deg, rgba(84, 239, 216, 0.1), transparent 48%),
    rgba(250, 255, 253, 0.82);
}

.assistant-record-failed {
  border-color: rgba(191, 85, 104, 0.28);
  background: rgba(255, 246, 248, 0.88);
}

.assistant-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.assistant-preview-text {
  padding: 12px 14px;
  border-left: 3px solid rgba(18, 158, 166, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  color: #31545e;
  line-height: 1.7;
  word-break: break-word;
}

.assistant-review-reason {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--ds-radius-md);
  background: rgba(197, 140, 38, 0.1);
  color: #765317;
  font-size: var(--ds-text-sm);
}

.assistant-review-reason strong {
  color: #8b6116;
}

.assistant-applied-field {
  border-color: rgba(27, 154, 111, 0.18) !important;
  background: rgba(27, 154, 111, 0.08) !important;
  color: #147451 !important;
}

.assistant-card-actions {
  justify-content: flex-end;
}

@container assistant-shell (max-width: 760px) {
  .assistant-commandbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: var(--ds-space-8);
  }

  .assistant-commandbar-state {
    width: fit-content;
  }

  .workflow-item-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .assistant-record-head {
    flex-direction: column;
  }

  .assistant-review-reason {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-item-side {
    justify-items: start;
    min-width: 0;
  }
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(18, 122, 132, 0.18);
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1260px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 220px;
  }

  .topbar-actions {
    justify-items: stretch;
    padding-right: 0;
  }

  .dashboard-layout,
  .crm-board,
  .quote-layout,
  .split,
  .split.narrow {
    grid-template-columns: 1fr;
  }

  .quote-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #brandWorkspace[data-brand-workspace="orders"] {
    grid-template-columns: 1fr;
  }

  .workspace-inspector,
  .quote-preview-card,
  .catalog-editor-card {
    position: static;
  }

  .detail-card {
    min-height: auto;
  }

  .dashboard-hero-stage,
  .dashboard-module-grid,
  .dashboard-link-dock {
    grid-template-columns: 1fr;
  }

  .dashboard-core-visual {
    min-height: 320px;
  }

  .quote-action-groups {
    width: 100%;
    justify-content: start;
  }

  body[data-panel="dashboard"] .sidebar {
    width: min(100%, 1120px);
    align-content: start;
    padding-top: clamp(28px, 5vw, 52px);
  }

  body[data-panel="dashboard"] .brand {
    width: 100%;
  }

  body[data-panel="dashboard"] .brand h1 {
    font-size: clamp(38px, 6vw, 62px);
  }

  body[data-panel="dashboard"] .nav {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-panel="dashboard"] .nav-link {
    min-height: 112px;
  }
}

@media (max-width: 1520px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-items: stretch;
    padding-right: 0;
  }

  .crm-board {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  }

  .crm-board > .detail-card:last-child {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .product-workspace {
    grid-template-columns: 1fr;
  }

  .quote-layout {
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  }
}

@media (max-width: 1260px) {
  .quote-layout,
  .dashboard-layout,
  .crm-board,
  .split,
  .split.narrow,
  #brandWorkspace[data-brand-workspace="orders"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  #panel-customers .crm-redesign-shell {
    max-width: none;
  }

  #panel-customers .crm-overview-topline,
  #panel-customers .crm-overview-kpis,
  #panel-customers .crm-overview-main,
  #panel-customers .crm-activity-strip {
    width: 100%;
    max-width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  body[data-panel="dashboard"] .layout {
    grid-template-columns: 1fr;
  }

  body[data-panel="dashboard"] .sidebar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav";
    align-content: start;
    gap: 16px;
    padding: 22px;
  }

  body[data-panel="dashboard"] .brand {
    align-self: start;
  }

  body[data-panel="dashboard"] .brand-mark {
    width: 62px;
    height: 62px;
    font-size: 15px;
  }

  body[data-panel="dashboard"] .brand h1 {
    font-size: 31px;
    white-space: normal;
  }

  body[data-panel="dashboard"] .brand p {
    font-size: 14px;
  }

  body[data-panel="dashboard"] .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-panel="dashboard"] .nav-link {
    min-height: 86px;
    padding: 18px 38px 18px 18px;
    border-radius: 22px;
    font-size: 16px;
    text-align: center;
  }

  body[data-panel="dashboard"] .nav-link::before {
    inset: 16px auto 16px 12px;
    width: 4px;
    height: auto;
    transform: none;
  }

  body[data-panel="dashboard"] .nav-link:hover::before {
    transform: scaleY(1.04);
  }

  body[data-panel="dashboard"] .nav-link::after {
    right: 14px;
    top: 14px;
    font-size: 11px;
  }

  body[data-panel="dashboard"] .sidebar-status-list {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .toast {
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: min(440px, calc(100vw - 32px));
    min-width: 0;
    border-radius: 18px;
    padding: 11px 14px;
    transform: translate(-50%, 18px);
  }

  .toast.show {
    transform: translate(-50%, 0);
  }

  .brand {
    padding-right: 118px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
  }

  .brand h1 {
    font-size: 22px;
    line-height: 1.08;
    white-space: nowrap;
  }

  .brand p {
    font-size: 13px;
    line-height: 1.35;
  }

  .page-quick-actions {
    right: 14px;
    top: 14px;
  }

  .floating-action-button {
    width: 44px;
    height: 42px;
    min-width: 44px;
    font-size: 17px;
  }

  .manual-trigger {
    min-height: 42px;
    padding: 8px 12px 8px 9px;
    font-size: 12px;
  }

  .manual-trigger::before {
    width: 22px;
    height: 22px;
    font-size: 13px;
  }

  .manual-modal {
    padding: 14px;
  }

  .manual-header,
  .manual-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .manual-header {
    flex-direction: column;
  }

  .quote-action-groups {
    justify-content: start;
  }

  .quote-preview-card > .section-head > div:first-child,
  .quote-preview-card .quote-action-groups,
  .quote-status-card > div:first-child,
  .quote-status-actions {
    flex: 0 1 auto;
  }

  .quote-preview-card .quote-action-groups,
  .quote-status-actions {
    width: 100%;
  }

  .quote-status-card {
    gap: 10px;
  }

  .quote-action-group {
    flex-wrap: wrap;
  }

  .topbar,
  .section-head,
  .subhead,
  .modal-header,
  .quote-status-card,
  .quote-section-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-summary-grid-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-shell {
    max-width: none;
  }

  .search-inline {
    max-width: none;
  }

  .chart-grid,
  .crm-filter-grid,
  .detail-columns,
  .detail-meta,
  .workbench-grid,
  .quote-summary-grid,
  .quote-branch-grid,
  .quote-inline-grid,
  .mini-stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .assistant-summary-grid {
    grid-template-columns: 1fr;
  }

  .workflow-hub-summary,
  .workflow-item-card,
  .deal-action-strip {
    grid-template-columns: 1fr;
  }

  .workflow-item-side {
    justify-items: start;
    min-width: 0;
  }

  .workflow-actions {
    justify-content: flex-start;
  }

  .assistant-record-head {
    flex-direction: column;
  }

  .field-combo {
    grid-template-columns: 1fr;
  }

  .quote-row {
    flex-direction: column;
  }

  .quote-cover-band {
    flex-direction: column;
  }

  .quote-cover-crest,
  .quote-cover-badges {
    justify-content: flex-start;
  }

  .quote-cover-ribbon {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-pills {
    gap: 6px;
  }

  .workspace-strip {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .workspace-strip-meta {
    justify-content: flex-start;
  }

  .dashboard-hero-stage {
    padding: 24px 22px;
    min-height: auto;
  }

  .dashboard-signal-rack {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-primary-actions {
    flex-direction: column;
    justify-content: stretch;
  }

  .dashboard-signal-main {
    min-width: 0;
  }

  .dashboard-cta {
    width: 100%;
  }

  body[data-panel="dashboard"] .content,
  body[data-panel="dashboard"] .content-shell,
  body[data-panel="dashboard"] .panel.active,
  body[data-panel="dashboard"] .dashboard-hub,
  body[data-panel="dashboard"] .dashboard-module-grid,
  body[data-panel="dashboard"] .dashboard-hero-stage,
  body[data-panel="dashboard"] .dashboard-module-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  body[data-panel="dashboard"] .content {
    transform: none;
  }

  body[data-panel="dashboard"] .dashboard-module-card {
    grid-template-columns: minmax(56px, auto) minmax(0, 1fr);
  }

  body[data-panel="dashboard"] .dashboard-module-body,
  body[data-panel="dashboard"] .dashboard-module-foot {
    min-width: 0;
  }

  .cursor-field {
    display: none;
  }

  .hero-card {
    gap: 18px;
  }

  .hero-copy h3 {
    font-size: 24px;
  }

  .hero-visual {
    min-height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .ambient-stage,
  .hero-visual,
  .cursor-field {
    display: none;
  }
}

/* CRM redesign: dense customer management workspace */
body[data-panel="customers"] .topbar {
  display: none;
}

#panel-customers .crm-redesign-shell {
  display: grid;
  width: 100%;
  gap: 16px;
  max-width: 100%;
}

#panel-customers .crm-redesign-shell > * {
  min-width: 0;
  width: 100%;
}

@media (max-width: 980px) {
  #panel-customers .crm-redesign-shell {
    width: 100%;
    max-width: 100%;
  }
}

#panel-customers .crm-commandbar,
#panel-customers .crm-filter-rail,
#panel-customers .crm-customer-page,
#panel-customers .crm-section {
  border: 1px solid rgba(33, 81, 91, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(11, 45, 54, 0.08);
}

#panel-customers .crm-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

#panel-customers .crm-commandbar h3 {
  margin: 2px 0 4px;
  color: #0c2630;
  font-size: 24px;
}

#panel-customers .crm-commandbar p {
  margin: 0;
  color: #5d7580;
}

#panel-customers .crm-commandbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#panel-customers .crm-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(32, 83, 93, 0.12);
  border-radius: 8px;
  background: #f3f8f8;
}

#panel-customers .crm-view-switch button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #385962;
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

#panel-customers .crm-view-switch button::after {
  display: none;
}

#panel-customers .crm-view-switch button.active {
  border-color: rgba(24, 126, 109, 0.22);
  background: #dff4ef;
  color: #0e6354;
}

#panel-customers .crm-view-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#panel-customers .crm-sync-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(24, 126, 109, 0.18);
  background: #edf9f5;
  color: #106956;
  font-size: 12px;
  font-weight: 800;
}

#panel-customers .crm-overview-dashboard {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(31, 86, 94, 0.12);
  border-radius: 10px;
  background:
    radial-gradient(circle at 96% 0%, rgba(78, 183, 255, 0.1), transparent 24%),
    radial-gradient(circle at 0% 10%, rgba(65, 218, 181, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 252, 251, 0.92));
  box-shadow: 0 18px 42px rgba(7, 40, 48, 0.12);
}

#panel-customers .crm-overview-topline,
#panel-customers .crm-overview-card-head,
#panel-customers .crm-overview-card-foot,
#panel-customers .crm-activity-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

#panel-customers .crm-overview-topline,
#panel-customers .crm-overview-kpis,
#panel-customers .crm-activity-strip {
  min-width: 0;
  width: min(100%, calc(100vw - 418px));
  max-width: min(100%, calc(100vw - 418px));
}

#panel-customers .crm-overview-topline h3 {
  margin: 0;
  color: #0d2d37;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

#panel-customers .crm-overview-topline p {
  margin: 6px 0 0;
  color: #607981;
  font-size: 13px;
}

#panel-customers .crm-overview-date {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(31, 86, 94, 0.12);
  background: #f7fbfb;
  color: #31545e;
  font-size: 12px;
  font-weight: 800;
}

#panel-customers .crm-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#panel-customers .crm-overview-kpi {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31, 86, 94, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

#panel-customers .crm-overview-kpi span,
#panel-customers .crm-overview-kpi small {
  display: block;
  color: #668088;
  font-size: 12px;
}

#panel-customers .crm-overview-kpi strong {
  display: block;
  margin: 5px 0 3px;
  color: #102f39;
  font-size: 24px;
  line-height: 1;
}

#panel-customers .crm-overview-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: start;
  min-width: 0;
  width: min(100%, calc(100vw - 418px));
  max-width: min(100%, calc(100vw - 418px));
}

#panel-customers .crm-overview-main > * {
  min-width: 0;
}

#panel-customers .crm-overview-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

#panel-customers .crm-overview-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 190px;
  padding: 13px;
  border: 1px solid rgba(31, 86, 94, 0.12);
  border-left: 4px solid #58a6c7;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

#panel-customers .crm-overview-card:hover,
#panel-customers .crm-overview-card.active-card {
  transform: translateY(-2px);
  border-color: rgba(20, 137, 122, 0.38);
  box-shadow: 0 12px 24px rgba(12, 80, 75, 0.12);
}

#panel-customers .crm-overview-card.danger {
  border-left-color: #d4505f;
}

#panel-customers .crm-overview-card.warn,
#panel-customers .crm-overview-card.hot {
  border-left-color: #d6922d;
}

#panel-customers .crm-overview-card.stable {
  border-left-color: #34a56f;
}

#panel-customers .crm-overview-card-head strong {
  display: block;
  color: #102f39;
  font-size: 15px;
  overflow-wrap: anywhere;
}

#panel-customers .crm-overview-card-head span,
#panel-customers .crm-card-reason,
#panel-customers .crm-overview-card-foot {
  color: #607981;
  font-size: 12px;
}

#panel-customers .crm-overview-card-head mark {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 7px;
  background: #eaf6fb;
  color: #1d6882;
  font-size: 12px;
  font-weight: 800;
}

#panel-customers .crm-overview-card.danger mark {
  background: #fff0f2;
  color: #a72f42;
}

#panel-customers .crm-overview-card.warn mark,
#panel-customers .crm-overview-card.hot mark {
  background: #fff5e4;
  color: #9b650f;
}

#panel-customers .crm-overview-card.stable mark {
  background: #eaf8f0;
  color: #19764f;
}

#panel-customers .crm-next-action {
  min-height: 38px;
  color: #11323b;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#panel-customers .crm-mini-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

#panel-customers .crm-mini-timeline span {
  min-width: 0;
  padding: 6px 4px;
  border-radius: 7px;
  background: #edf3f4;
  color: #789098;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#panel-customers .crm-mini-timeline span.done {
  background: #dff4ef;
  color: #0e6354;
}

#panel-customers .crm-overview-card-foot {
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  font-weight: 800;
}

#panel-customers .crm-priority-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(31, 86, 94, 0.12);
  border-radius: 8px;
  background: #f9fcfc;
}

#panel-customers .crm-priority-list {
  display: grid;
  gap: 8px;
}

#panel-customers .crm-priority-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 9px;
  border: 1px solid rgba(31, 86, 94, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: #14343d;
  text-align: left;
  cursor: pointer;
}

#panel-customers .crm-priority-item::after {
  display: none;
}

#panel-customers .crm-priority-item:hover {
  border-color: rgba(20, 137, 122, 0.34);
  background: #f2fbf8;
}

#panel-customers .crm-priority-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eaf6fb;
  color: #1d6882;
  font-weight: 900;
}

#panel-customers .crm-priority-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#panel-customers .crm-priority-copy strong,
#panel-customers .crm-priority-copy small {
  overflow-wrap: anywhere;
}

#panel-customers .crm-priority-copy small {
  color: #607981;
  font-size: 12px;
}

#panel-customers .crm-priority-action {
  padding: 6px 8px;
  border-radius: 7px;
  background: #e7f5f2;
  color: #176b5d;
  font-size: 12px;
  font-weight: 900;
}

#panel-customers .crm-activity-strip {
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid rgba(31, 86, 94, 0.1);
}

#panel-customers .crm-activity-list {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

#panel-customers .crm-activity-list button {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 7px;
  align-items: center;
  min-width: max-content;
  padding: 7px 9px;
  border: 1px solid rgba(31, 86, 94, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: #173640;
  cursor: pointer;
}

#panel-customers .crm-activity-list button::after {
  display: none;
}

#panel-customers .crm-activity-list span,
#panel-customers .crm-activity-list em {
  color: #668088;
  font-size: 12px;
  font-style: normal;
}

#panel-customers .crm-overview-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed rgba(31, 86, 94, 0.18);
  border-radius: 8px;
  color: #173640;
  background: #ffffff;
}

#panel-customers .crm-overview-empty span {
  color: #607981;
  font-size: 13px;
}

#panel-customers .crm-overview-board-actions {
  display: flex;
  justify-content: flex-end;
  width: min(100%, calc(100vw - 418px));
  max-width: min(100%, calc(100vw - 418px));
}

#panel-customers .crm-redesign-shell[data-crm-view="board"] .crm-board,
#panel-customers .crm-redesign-shell[data-crm-view="select"] .crm-overview-dashboard,
#panel-customers .crm-redesign-shell[data-crm-view="detail"] .crm-overview-dashboard {
  display: none;
}

#panel-customers .crm-redesign-shell[data-crm-view="select"] .crm-board {
  grid-template-columns: minmax(0, 1fr);
}

#panel-customers .crm-redesign-shell[data-crm-view="select"] .crm-filter-rail {
  position: static;
  max-height: none;
}

#panel-customers .crm-redesign-shell[data-crm-view="select"] .crm-customer-page {
  display: none;
}

#panel-customers .crm-redesign-shell[data-crm-view="detail"] .crm-board {
  grid-template-columns: minmax(0, 1fr);
}

#panel-customers .crm-redesign-shell[data-crm-view="detail"] .crm-filter-rail {
  display: none;
}

#panel-customers .crm-board {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#panel-customers .crm-filter-rail {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  padding: 14px;
  overflow: auto;
}

#panel-customers .crm-rail-head {
  margin-bottom: 12px;
}

#panel-customers .crm-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

#panel-customers .crm-filter-grid .search {
  grid-column: 1 / -1;
}

#panel-customers .crm-filter-grid input,
#panel-customers .crm-filter-grid select,
#panel-customers .crm-inline-form input,
#panel-customers .crm-inline-form select,
#panel-customers .crm-inline-form textarea,
#panel-customers .crm-lead-filter {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(32, 83, 93, 0.16);
  background: #fbfdfd;
  color: #15323c;
  box-shadow: none;
}

#panel-customers .crm-customer-list {
  display: grid;
  gap: var(--ds-space-5);
}

#panel-customers .crm-customer-month-group {
  min-width: 0;
  border-top: 1px solid var(--ds-line);
}

#panel-customers .crm-customer-month-group:first-child {
  border-top: 0;
}

#panel-customers .crm-customer-month-group > summary {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-width: 0;
  padding: var(--ds-space-4) var(--ds-space-1);
  color: var(--ds-ink-strong);
  cursor: pointer;
  list-style: none;
}

#panel-customers .crm-customer-month-group > summary::-webkit-details-marker {
  display: none;
}

#panel-customers .crm-customer-month-group > summary::after {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid var(--ds-accent-strong);
  border-bottom: 2px solid var(--ds-accent-strong);
  content: "";
  transform: rotate(45deg);
  transition: transform var(--ds-motion-fast);
}

#panel-customers .crm-customer-month-group:not([open]) > summary::after {
  transform: rotate(-45deg);
}

#panel-customers .crm-customer-month-title {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: var(--ds-space-3);
  min-width: 0;
}

#panel-customers .crm-customer-month-title strong {
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-lg);
}

#panel-customers .crm-customer-month-title small {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-customer-month-count {
  min-width: 28px;
  padding: var(--ds-space-1) var(--ds-space-2);
  border-radius: var(--ds-radius-pill);
  color: var(--ds-accent-strong);
  background: var(--ds-accent-soft);
  font-size: var(--ds-text-xs);
  font-weight: 800;
  text-align: center;
}

#panel-customers .crm-customer-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--ds-space-3);
  padding-bottom: var(--ds-space-5);
}

#panel-customers .crm-customer-row {
  display: grid;
  grid-template-rows: auto auto minmax(28px, auto) auto;
  align-content: start;
  gap: var(--ds-space-2);
  min-width: 0;
  min-height: 156px;
  height: 100%;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-clean);
  cursor: pointer;
  transition: border-color var(--ds-motion-fast), background var(--ds-motion-fast), box-shadow var(--ds-motion-fast), transform var(--ds-motion-fast);
}

#panel-customers .crm-customer-row:hover,
#panel-customers .crm-customer-row.active-card {
  border-color: var(--ds-line-strong);
  background: var(--ds-surface-bright);
  box-shadow: var(--ds-shadow-sm);
  transform: translateY(-1px);
}

#panel-customers .crm-customer-row-main,
#panel-customers .crm-customer-row-money {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

#panel-customers .crm-customer-row-main strong {
  min-width: 0;
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-lg);
  overflow-wrap: anywhere;
}

#panel-customers .crm-customer-row-main span,
#panel-customers .crm-customer-row-sub,
#panel-customers .crm-customer-row-money {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-customer-row-money {
  margin-top: auto;
  padding-top: var(--ds-space-2);
  border-top: 1px solid var(--ds-line);
  color: var(--ds-ink-strong);
  font-weight: 800;
  flex-wrap: wrap;
}

#panel-customers .crm-customer-row-money span {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
}

#panel-customers .crm-customer-row-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-customers .crm-customer-row-meta {
  display: flex;
  align-content: start;
  gap: var(--ds-space-1);
  flex-wrap: wrap;
}

#panel-customers .crm-customer-row-meta .pill {
  padding: 4px 7px;
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-lead-drawer {
  margin-top: 14px;
}

#panel-customers .crm-lead-drawer details {
  border-top: 1px solid rgba(31, 86, 94, 0.12);
  padding-top: 12px;
}

#panel-customers .crm-lead-drawer summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  color: #173640;
  font-weight: 800;
}

#panel-customers .crm-lead-filter {
  width: 100%;
  margin: 10px 0;
}

#panel-customers .crm-wechat-match-row {
  display: grid;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-identity-focus-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-3);
  align-items: center;
  margin-top: var(--ds-space-3);
  padding: var(--ds-space-4);
  border: 1px solid color-mix(in srgb, var(--ds-accent) 42%, var(--ds-line));
  border-radius: var(--ds-radius-sm);
  background: color-mix(in srgb, var(--ds-accent-soft) 72%, var(--ds-paper-strong));
}

#panel-customers .crm-identity-focus-guide > div {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

#panel-customers .crm-identity-focus-guide strong,
#panel-customers .crm-identity-focus-guide span {
  overflow-wrap: anywhere;
}

#panel-customers .crm-identity-focus-guide > div > span {
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
}

#panel-customers .crm-wechat-match-row.is-focus-target {
  border-color: color-mix(in srgb, var(--ds-accent) 58%, var(--ds-line));
  box-shadow: inset 3px 0 0 var(--ds-accent);
}

#panel-customers .crm-wechat-drawer,
#panel-customers .crm-wechat-customer-section,
#panel-customers .crm-chat-facts-section {
  container-type: inline-size;
}

#panel-customers .crm-wechat-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-3);
  align-items: center;
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-wechat-review-copy {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
}

#panel-customers .crm-wechat-review-copy p {
  margin: 0;
  color: var(--ds-ink);
  overflow-wrap: anywhere;
}

#panel-customers .crm-wechat-match-copy,
#panel-customers .crm-wechat-match-controls,
#panel-customers .crm-wechat-match-controls select {
  min-width: 0;
}

#panel-customers .crm-wechat-match-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-2);
  align-items: center;
}

#panel-customers .crm-wechat-customer-section {
  margin-top: var(--ds-space-4);
}

#panel-customers .crm-wechat-ai-button {
  min-width: 156px;
  justify-self: end;
  white-space: nowrap;
}

#panel-customers .crm-wechat-customer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-4);
  align-items: center;
}

#panel-customers .crm-wechat-analysis-empty {
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-service-snapshot {
  display: grid;
  gap: var(--ds-space-4);
  margin-top: var(--ds-space-4);
  padding: var(--ds-space-6);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-paper-soft);
}

#panel-customers .crm-service-snapshot.confirmed {
  border-color: color-mix(in srgb, var(--ds-ok) 38%, transparent);
}

#panel-customers .crm-service-snapshot-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-4);
  align-items: start;
}

#panel-customers .crm-service-snapshot-head strong {
  display: block;
  margin-top: var(--ds-space-2);
}

#panel-customers .crm-service-snapshot > p,
#panel-customers .crm-service-evidence p {
  margin: 0;
  overflow-wrap: anywhere;
}

#panel-customers .crm-service-next {
  display: grid;
  gap: var(--ds-space-1);
}

#panel-customers .crm-service-next span,
#panel-customers .crm-service-progress-grid span,
#panel-customers .crm-service-progress-grid small {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

#panel-customers .crm-service-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-service-progress-grid > div {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
  padding: var(--ds-space-3);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-paper-strong);
}

#panel-customers .crm-service-progress summary,
#panel-customers .crm-service-evidence summary {
  cursor: pointer;
  color: var(--ds-accent-strong);
  font-weight: 800;
}

#panel-customers .crm-service-evidence > div {
  display: grid;
  gap: var(--ds-space-1);
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-line);
}

#panel-customers .crm-service-review-actions {
  justify-content: flex-end;
}

#panel-customers .crm-chat-facts-section {
  margin-top: var(--ds-space-4);
}

#panel-customers .crm-chat-fact-summary,
#panel-customers .crm-chat-fact-source-note,
#panel-customers .crm-chat-fact-row {
  margin-top: var(--ds-space-3);
}

#panel-customers .crm-chat-fact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-4);
  align-items: center;
}

#panel-customers .crm-chat-fact-row > div:first-child {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
}

#panel-customers .crm-chat-fact-row .muted {
  overflow-wrap: anywhere;
}

#panel-customers .crm-chat-facts-more {
  margin-top: var(--ds-space-3);
  border-top: 1px solid var(--ds-line);
  padding-top: var(--ds-space-3);
}

#panel-customers .crm-chat-facts-more > summary {
  cursor: pointer;
  color: var(--ds-accent-strong);
  font-weight: 800;
}

@container (max-width: 430px) {
  #panel-customers .crm-identity-focus-guide,
  #panel-customers .crm-wechat-match-controls,
  #panel-customers .crm-wechat-review-row,
  #panel-customers .crm-wechat-customer-row,
  #panel-customers .crm-chat-fact-row,
  #panel-customers .crm-service-snapshot-head {
    grid-template-columns: minmax(0, 1fr);
  }

  #panel-customers .crm-identity-focus-guide > .pill {
    justify-self: start;
  }

  #panel-customers .crm-wechat-match-controls button,
  #panel-customers .crm-wechat-review-row button,
  #panel-customers .crm-wechat-ai-button,
  #panel-customers .crm-wechat-customer-row button,
  #panel-customers .crm-chat-fact-row button {
    width: 100%;
  }

  #panel-customers .crm-wechat-ai-button {
    justify-self: stretch;
  }
}

#panel-customers .crm-customer-page {
  min-height: 720px;
  padding: 0;
  overflow: hidden;
}

#panel-customers .crm-hidden-editor {
  display: none;
}

#panel-customers .crm-detail-page {
  display: grid;
  gap: 16px;
  padding: 18px;
}

#panel-customers .crm-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 86, 94, 0.12);
}

#panel-customers .crm-detail-title h2 {
  margin: 4px 0 8px;
  color: #0d2d37;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

#panel-customers .crm-detail-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #59747d;
  font-size: 13px;
}

#panel-customers .crm-detail-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

#panel-customers .crm-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

#panel-customers .crm-kpi-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(31, 86, 94, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6fbfa);
}

#panel-customers .crm-kpi-card span,
#panel-customers .crm-kpi-card small {
  color: #668088;
  font-size: 12px;
}

#panel-customers .crm-kpi-card strong {
  color: #0f3a42;
  font-size: 20px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#panel-customers .crm-detail-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid rgba(31, 86, 94, 0.12);
  border-radius: 8px;
  background: #f5faf9;
}

#panel-customers .crm-detail-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #385962;
  box-shadow: none;
}

#panel-customers .crm-detail-tabs button::after {
  display: none;
}

#panel-customers .crm-detail-tabs button.active {
  border-color: rgba(24, 126, 109, 0.24);
  background: #dff4ef;
  color: #0e6354;
}

#panel-customers .crm-detail-body {
  display: grid;
  gap: 14px;
}

#panel-customers .crm-overview-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 14px;
}

#panel-customers .crm-section {
  padding: 16px;
  box-shadow: none;
}

#panel-customers .crm-section .section-head {
  margin-bottom: 12px;
}

#panel-customers .crm-section h3 {
  color: #11323b;
  font-size: 17px;
}

#panel-customers .crm-action-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(24, 126, 109, 0.14);
  background: #f1faf7;
}

#panel-customers .crm-action-card p {
  margin: 0;
  color: #607981;
}

#panel-customers .crm-inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.crm-shipping-parser,
.crm-shipping-locked {
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius-md);
  background: var(--ds-paper-soft);
}

.crm-shipping-parser {
  display: grid;
  gap: var(--ds-space-3);
}

.crm-shipping-parser-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-items: end;
  gap: var(--ds-space-3);
}

.crm-shipping-parser-head > div {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.crm-shipping-parser-head strong {
  color: var(--ds-ink-strong);
}

.crm-shipping-parser-head span,
.crm-shipping-locked,
.crm-shipping-parser-result {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
  line-height: 1.55;
}

.crm-shipping-parser-head button {
  justify-self: end;
}

.crm-shipping-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--ds-space-2);
  flex-wrap: wrap;
}

.crm-shipping-parser textarea {
  min-height: 92px;
  resize: vertical;
}

.crm-shipping-parser-result {
  display: grid;
  gap: var(--ds-space-1);
}

.crm-shipping-parser-result span {
  overflow-wrap: anywhere;
}

.crm-shipping-parser-result[data-status="success"] {
  color: var(--ds-ok);
}

.crm-shipping-parser-result[data-status="warning"] {
  color: var(--ds-warn);
}

.crm-shipping-parser-result[data-status="error"] {
  color: var(--ds-danger);
}

#panel-customers .crm-inline-form .full,
#panel-customers .crm-form-title {
  grid-column: 1 / -1;
}

#panel-customers .crm-form-title {
  color: #173640;
  font-size: 13px;
  font-weight: 800;
}

#panel-customers .crm-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#panel-customers .crm-field span {
  color: #607981;
  font-size: 12px;
  font-weight: 800;
}

#panel-customers .crm-field input,
#panel-customers .crm-field select,
#panel-customers .crm-field textarea {
  width: 100%;
}

#panel-customers .crm-need-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#panel-customers .crm-need-item {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbfb;
}

#panel-customers .crm-need-item span,
#panel-customers .crm-recent-row span {
  color: #668088;
  font-size: 12px;
}

#panel-customers .crm-need-item strong,
#panel-customers .crm-recent-row strong {
  color: #173640;
  font-size: 14px;
}

#panel-customers .crm-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#panel-customers .crm-tag-cloud span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #e7f5f2;
  color: #176b5d;
  font-size: 12px;
  font-weight: 800;
}

#panel-customers .crm-recent-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(31, 86, 94, 0.1);
}

#panel-customers .crm-profit-note {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f4f8fb;
  color: #294d58;
  font-weight: 800;
}

#panel-customers .crm-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
}

#panel-customers .crm-table-wrap {
  width: 100%;
  overflow-x: auto;
}

#panel-customers .crm-data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  font-size: 13px;
}

#panel-customers .crm-data-table th,
#panel-customers .crm-data-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(31, 86, 94, 0.1);
  text-align: left;
  vertical-align: top;
}

#panel-customers .crm-data-table th {
  background: #f3f8f8;
  color: #46636c;
  font-size: 12px;
}

#panel-customers .crm-data-table td {
  color: #173640;
}

@media (max-width: 1500px) {
  #panel-customers .crm-overview-main {
    grid-template-columns: 1fr;
  }

  #panel-customers .crm-priority-panel {
    order: -1;
  }

  #panel-customers .crm-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #panel-customers .crm-priority-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  #panel-customers .crm-overview-main,
  #panel-customers .crm-overview-cards {
    grid-template-columns: 1fr;
  }

  #panel-customers .crm-overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #panel-customers .crm-board,
  #panel-customers .crm-overview-grid,
  #panel-customers .crm-two-column {
    grid-template-columns: 1fr;
  }

  #panel-customers .crm-filter-rail {
    position: static;
    max-height: none;
  }

  #panel-customers .crm-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #panel-customers .crm-priority-item {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
  }

  #panel-customers .crm-priority-action {
    grid-column: 2;
    width: max-content;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  #panel-customers .crm-redesign-shell,
  #panel-customers .crm-overview-dashboard,
  #panel-customers .crm-overview-topline,
  #panel-customers .crm-overview-kpis,
  #panel-customers .crm-overview-main,
  #panel-customers .crm-overview-board-actions,
  #panel-customers .crm-overview-cards,
  #panel-customers .crm-priority-panel,
  #panel-customers .crm-activity-strip {
    width: 100%;
    max-width: 100%;
  }

  #panel-customers .crm-overview-topline,
  #panel-customers .crm-activity-strip {
    display: grid;
  }

  #panel-customers .crm-overview-kpis {
    grid-template-columns: 1fr;
  }

  #panel-customers .crm-priority-list {
    grid-template-columns: 1fr;
  }

  #panel-customers .crm-commandbar,
  #panel-customers .crm-detail-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  #panel-customers .crm-commandbar-actions,
  #panel-customers .crm-detail-actions {
    justify-content: flex-start;
    justify-items: start;
  }

  #panel-customers .crm-filter-grid,
  #panel-customers .crm-inline-form,
  #panel-customers .crm-need-grid,
  #panel-customers .crm-kpi-strip {
    grid-template-columns: 1fr;
  }
}

body[data-cost-mode="hidden"] input.cost-masked,
body[data-cost-mode="hidden"] input[name="costPrice"],
body[data-cost-mode="hidden"] #itemCostPrice,
body[data-cost-mode="hidden"] [data-grid-field="costPrice"],
body[data-cost-mode="hidden"] [data-quote-edit-field="costPrice"] {
  -webkit-text-security: disc;
  color: transparent;
  text-shadow: 0 0 0 #64748b;
}

.cost-masked {
  border-color: rgba(59, 130, 246, 0.22) !important;
  background: rgba(239, 246, 255, 0.78) !important;
}

.crm-action-dock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}

#panel-customers .mobile-service-summary {
  align-items: start;
}

#panel-customers .mobile-requirement-list,
#panel-customers .mobile-service-list {
  display: grid;
  min-width: 0;
}

#panel-customers .mobile-requirement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ds-space-4);
  min-width: 0;
  padding: var(--ds-space-4) 0;
  border-bottom: 1px solid var(--ds-line);
}

#panel-customers .mobile-requirement-row:last-child {
  border-bottom: 0;
}

#panel-customers .mobile-requirement-row strong,
#panel-customers .mobile-service-form-head strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ds-ink);
}

#panel-customers .mobile-service-manager {
  margin-top: var(--ds-space-6);
}

#panel-customers .mobile-device-plan-panel {
  margin-top: var(--ds-space-6);
}

#panel-customers .mobile-device-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(168px, 100%), 1fr));
  gap: var(--ds-space-4);
  min-width: 0;
}

#panel-customers .mobile-device-stat {
  display: grid;
  align-content: start;
  gap: var(--ds-space-2);
  min-width: 0;
  min-height: 92px;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-paper-soft);
}

#panel-customers .mobile-device-stat span,
#panel-customers .mobile-device-stat small {
  min-width: 0;
  color: var(--ds-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

#panel-customers .mobile-device-stat strong {
  min-width: 0;
  color: var(--ds-ink);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#panel-customers .mobile-device-plan-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--ds-space-4);
  min-width: 0;
  margin-top: var(--ds-space-5);
}

#panel-customers .mobile-device-flow-card {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-sm);
  background: var(--ds-paper);
}

#panel-customers .mobile-device-flow-card strong {
  color: var(--ds-ink);
}

#panel-customers .mobile-device-flow-card p {
  margin: 0;
  color: var(--ds-muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#panel-customers .mobile-device-plan-actions {
  margin-top: var(--ds-space-5);
}

#panel-customers .mobile-service-form {
  min-width: 0;
  padding: var(--ds-space-7) 0;
  border-top: 1px solid var(--ds-line);
}

#panel-customers .mobile-service-form:first-child {
  padding-top: 0;
  border-top: 0;
}

#panel-customers .mobile-service-form-head,
.knowledge-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-4);
  min-width: 0;
}

#panel-customers .mobile-service-form-grid {
  margin-top: var(--ds-space-5);
}

#panel-customers .mobile-service-actions {
  margin-top: var(--ds-space-4);
}

#panel-customers .compact-empty-state {
  min-height: 0;
  padding: var(--ds-space-10);
}

.knowledge-entry-head > strong {
  min-width: 0;
}

.danger-button {
  border-color: color-mix(in srgb, var(--ds-danger) 30%, transparent) !important;
  color: var(--ds-danger) !important;
}

@media (max-width: 720px) {
  #panel-customers .mobile-requirement-row,
  #panel-customers .mobile-service-form-head,
  .knowledge-entry-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  #panel-customers .mobile-requirement-row .toolbar-inline,
  #panel-customers .mobile-service-form-head .pill-row,
  .knowledge-entry-head .pill-row {
    justify-content: flex-start;
  }
}

.crm-action-tile,
.catalog-pick-card {
  min-height: 92px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 12px;
  display: grid;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.crm-action-tile:hover,
.catalog-pick-card:hover {
  border-color: rgba(59, 130, 246, 0.58);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.crm-action-tile span {
  width: max-content;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  padding: 3px 8px;
}

.crm-action-tile strong,
.catalog-pick-card strong,
.material-card strong,
.quote-library-card-head strong {
  overflow-wrap: anywhere;
}

.crm-action-tile small {
  color: #64748b;
  line-height: 1.45;
}

.quote-flow-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 12px;
  margin: 12px 0 14px;
}

.quote-flow-steps,
.quote-flow-metrics,
.backup-assurance-note {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
}

.quote-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
}

.quote-flow-step > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
}

.quote-flow-step.done > span {
  background: #dcfce7;
  color: #15803d;
}

.quote-flow-step.active {
  background: #eff6ff;
}

.quote-flow-step.active > span {
  background: #3b82f6;
  color: #fff;
}

.quote-flow-step small {
  display: block;
  color: #64748b;
  line-height: 1.4;
}

.quote-flow-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
}

.quote-flow-metrics span,
.quote-flow-metrics strong {
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 10px;
}

.quote-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.quote-library-card-item {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px;
  display: grid;
  gap: 9px;
}

.quote-library-card-head,
.quote-library-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.quote-library-card-head span,
.quote-library-metrics span {
  color: #64748b;
}

.quote-library-total {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: #2563eb;
}

.quote-library-actions {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.quote-library-action-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(16, 130, 142, 0.1);
  border-radius: 13px;
  background:
    radial-gradient(circle at 0% 0%, rgba(101, 239, 221, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(247, 254, 254, 0.86), rgba(236, 249, 249, 0.58));
}

.quote-library-action-main {
  grid-template-columns: 1.1fr 1fr 0.78fr;
}

.quote-library-export-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
}

.quote-library-action-button,
.quote-library-actions .link-button {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  color: #075868;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  box-shadow: none;
  transform: none !important;
  transform-style: flat;
  animation: none;
  white-space: nowrap;
}

.quote-library-action-button::after,
.quote-library-actions .link-button::after,
.quote-library-action-button:hover::after,
.quote-library-actions .link-button:hover::after {
  display: none;
  content: none;
  animation: none;
}

.quote-library-action-button:hover,
.quote-library-actions .link-button:hover {
  border-color: rgba(16, 130, 142, 0.24);
  background: rgba(255, 255, 255, 0.94);
  color: #043a46;
}

.quote-library-primary-action {
  border-color: rgba(39, 213, 197, 0.34);
  color: #062b33;
  background:
    radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #6cf9e1, #20a5d8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 8px 18px rgba(11, 121, 158, 0.16);
}

.quote-library-primary-action:hover {
  border-color: rgba(39, 213, 197, 0.48);
  color: #062b33;
}

.quote-library-delete-action {
  border-color: rgba(216, 101, 101, 0.2);
  background: rgba(255, 245, 245, 0.82);
  color: #8c3a3a;
}

.quote-library-delete-action:hover {
  border-color: rgba(216, 101, 101, 0.34);
  background: rgba(255, 237, 237, 0.96);
  color: #7f2f2f;
}

.quote-library-commandbar {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(300px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(105, 246, 225, 0.13), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(236, 249, 249, 0.66));
}

.quote-library-title-block strong {
  display: block;
  color: #083d49;
  font-size: 16px;
}

.quote-library-title-block span {
  display: block;
  color: #5c7b84;
  font-size: 12px;
  font-weight: 800;
}

.quote-library-search {
  display: grid;
  gap: 6px;
}

.quote-library-search span {
  color: #0d7a83;
  font-size: 12px;
  font-weight: 900;
}

.quote-library-search input {
  min-height: 38px;
  border-radius: 11px;
}

.quote-library-toolbar-actions {
  display: flex;
  justify-content: flex-end;
}

.quote-trash-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(16, 130, 142, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: #075868;
  font-size: 12px;
  font-weight: 850;
  box-shadow: none;
  transform: none !important;
}

.quote-trash-trigger.active {
  border-color: rgba(39, 213, 197, 0.34);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.7), transparent 32%),
    linear-gradient(135deg, rgba(105, 246, 225, 0.92), rgba(205, 244, 255, 0.82));
}

.quote-trash-trigger b {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 130, 142, 0.1);
  color: #04404b;
  font-size: 11px;
}

.quote-trash-icon {
  width: 17px;
  height: 17px;
}

.quote-library-pagination,
.quote-library-page-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 130, 142, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #426b74;
  font-size: 12px;
  font-weight: 800;
}

.quote-library-pagination > div {
  display: flex;
  gap: 8px;
}

.quote-trash-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 36px;
}

.quote-trash-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(76, 210, 221, 0.12), transparent 34%),
    rgba(1, 20, 29, 0.62);
  box-shadow: none;
}

.quote-trash-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  width: min(1120px, calc(100vw - 72px));
  min-height: min(560px, calc(100vh - 72px));
  max-height: min(820px, calc(100vh - 72px));
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(122, 246, 234, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(105, 246, 225, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(247, 255, 255, 0.96), rgba(230, 246, 247, 0.92));
  box-shadow: 0 34px 90px rgba(0, 12, 20, 0.42);
}

.quote-trash-head,
.quote-trash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-trash-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(16, 130, 142, 0.12);
}

.quote-trash-head strong {
  display: block;
  color: #083d49;
  font-size: 22px;
}

.quote-trash-close {
  display: grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  place-items: center;
  border: 1px solid rgba(16, 130, 142, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #075868;
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.quote-trash-controls {
  display: grid;
  grid-template-columns: minmax(240px, auto) minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(16, 130, 142, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.quote-trash-retention {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #426b74;
  font-size: 12px;
  font-weight: 850;
}

.quote-trash-retention span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.quote-trash-retention select {
  min-height: 32px;
  border-radius: 10px;
}

.quote-trash-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.quote-trash-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 130, 142, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.quote-trash-row strong,
.quote-trash-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-trash-row small {
  margin-top: 2px;
  color: #607d86;
  font-size: 12px;
  font-weight: 700;
}

.quote-trash-row b {
  color: #0f5e6a;
  white-space: nowrap;
}

.compact-empty {
  padding: 12px;
}

.catalog-pick-row,
.material-card-grid,
.backup-assurance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.catalog-pick-card {
  min-height: 74px;
}

.catalog-pick-card span,
.material-card span {
  color: #64748b;
  font-size: 13px;
}

.material-group {
  display: grid;
  gap: 10px;
}

.material-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
  min-height: 142px;
}

.material-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.backup-assurance {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.backup-assurance-note {
  display: grid;
  gap: 4px;
  color: #475569;
}

.backup-assurance-note strong {
  color: #0f172a;
}

@media (max-width: 1180px) {
  .crm-action-dock,
  .quote-flow-guide,
  .quote-flow-steps,
  .quote-library-grid,
  .catalog-pick-row,
  .material-card-grid,
  .backup-assurance-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .crm-action-dock,
  .quote-flow-guide,
  .quote-flow-steps,
  .quote-flow-metrics,
  .quote-library-grid,
  .catalog-pick-row,
  .material-card-grid,
.backup-assurance-grid {
  grid-template-columns: 1fr;
}

.quote-preview-card #quoteDraft {
  gap: 10px;
}

.quote-preview-card .quote-cover {
  padding: 14px;
  border-radius: 18px;
}

.quote-preview-card .quote-cover-crest {
  gap: 10px;
  margin-bottom: 12px;
}

.quote-preview-card .quote-cover-mark {
  width: 50px;
  height: 50px;
}

.quote-preview-card .quote-cover-note {
  gap: 3px;
}

.quote-preview-card .quote-cover-band {
  gap: 12px;
}

.quote-preview-card .quote-cover-chip {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0;
}

.quote-preview-card .quote-cover-ribbon {
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.quote-preview-card .quote-summary-grid {
  gap: 7px;
  margin-top: 10px;
}

.quote-preview-card .quote-summary-grid-primary .summary-card {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 11px;
}

.quote-preview-card .quote-summary-grid .summary-card strong {
  margin-top: 2px;
  font-size: 15px;
}

.quote-preview-card .quote-sort-note {
  margin-top: 10px;
  padding: 10px 12px;
  line-height: 1.45;
}

.quote-preview-card .quote-group {
  padding: 14px;
}

.quote-preview-card .quote-section-banner {
  gap: 10px;
  margin-bottom: 10px;
}

.quote-preview-card .quote-group-number {
  width: 50px;
  min-height: 50px;
  border-radius: 14px;
}

.quote-preview-card .quote-category-divider {
  margin: 10px 0 0;
  padding: 8px 10px;
}

.quote-preview-card .quote-row {
  gap: 10px;
  padding: 10px 0;
}

.quote-preview-card .quote-row-summary {
  gap: 5px;
}

.quote-preview-card .quote-row-meta {
  line-height: 1.4;
}

.quote-preview-card .quote-row-note {
  padding: 8px 10px;
  border-radius: 12px;
  line-height: 1.4;
}

.quote-preview-card .quote-row-chipline {
  gap: 6px;
}

.quote-preview-card .quote-row-actions {
  min-width: 0;
  gap: 6px;
}

.quote-preview-card .quote-line-total,
.quote-preview-card .quote-cost-total {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: none;
}

@media (min-width: 721px) and (max-width: 980px) {
  .quote-preview-card .quote-summary-grid-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-preview-card .quote-summary-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-preview-card .quote-row {
    flex-direction: row;
  }

  .quote-preview-card .quote-row-actions {
    width: min(240px, 36%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-preview-card .quote-row-actions .quote-line-total,
  .quote-preview-card .quote-row-actions .quote-cost-total {
    width: 100%;
  }

  .quote-preview-card .quote-row-actions .file-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .quote-preview-card .quote-row-actions .file-actions .ghost-button {
    width: 100%;
    min-height: 30px;
    padding: 6px 7px;
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .quote-preview-card .quote-cover {
    padding: 12px;
  }

  .quote-preview-card .quote-cover-band,
  .quote-preview-card .quote-cover-ribbon {
    gap: 8px;
  }

  .quote-preview-card .quote-cover-badges {
    gap: 6px;
  }

  .quote-preview-card .quote-summary-grid-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-preview-card .quote-summary-grid-secondary {
    grid-template-columns: 1fr;
  }

  .quote-preview-card .quote-summary-grid-primary .summary-card {
    min-height: 44px;
  }

  .quote-preview-card .quote-sort-note {
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.42;
  }

  .quote-preview-card .quote-group {
    padding: 12px;
  }

  .quote-preview-card .quote-section-banner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .quote-preview-card .quote-section-banner .pill {
    grid-column: 2;
    justify-self: start;
  }

  .quote-preview-card .quote-group-number {
    width: 46px;
    min-height: 46px;
  }

  .quote-preview-card .quote-row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .quote-preview-card .quote-line-total {
    grid-column: span 2;
    width: 100%;
  }

  .quote-preview-card .quote-cost-total {
    grid-column: span 1;
    width: 100%;
    align-self: stretch;
    text-align: center;
  }

  .quote-preview-card .quote-row-actions .ghost-button {
    width: 100%;
    min-height: 30px;
    padding: 6px 7px;
    font-size: 12px;
  }

  .quote-preview-card .quote-row-actions .file-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
}

/* Keep CRM overview cards adaptive even when older module rules appear later. */
#panel-customers .crm-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* Fluid shell + adaptive grid: shared business grids respond to their own
   available width, so medium viewports keep useful density without overflow. */
.metric-grid,
.detail-meta,
.mini-stats,
.assistant-summary-grid,
.procurement-brief-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ds-grid-min-compact, 150px)), 1fr));
}

.detail-columns,
.form-grid,
.workbench-grid,
.quote-branch-grid,
.quote-inline-grid,
.share-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ds-grid-min-form, 220px)), 1fr));
}

.metric-grid > *,
.detail-meta > *,
.mini-stats > *,
.assistant-summary-grid > *,
.procurement-brief-grid > *,
.detail-columns > *,
.form-grid > *,
.workbench-grid > *,
.quote-branch-grid > *,
.quote-inline-grid > *,
.share-grid > * {
  min-width: 0;
}

  .quote-library-toolbar,
  .quote-library-commandbar,
  .area-selected-card,
  .quote-status-card {
    align-items: stretch;
  }

  .quote-library-toolbar,
  .quote-library-commandbar,
  .area-selected-card,
  .quote-trash-head,
  .quote-trash-controls,
  .quote-trash-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .quote-action-groups,
  .quote-summary-grid-primary {
    grid-template-columns: 1fr;
  }

  .area-selected-actions,
  .quote-trash-trigger {
    width: 100%;
    justify-content: center;
  }

  .quote-status-actions,
  .quote-status-action-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .quote-trash-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quote-trash-row b {
    grid-column: 2;
    justify-self: start;
  }

  .quote-library-export-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-trash-modal {
    padding: 12px;
  }

  .quote-trash-sheet {
    width: calc(100vw - 24px);
    min-height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    padding: 14px;
    border-radius: 16px;
  }

  .quote-trash-controls {
    grid-template-columns: 1fr;
  }
}

/* Responsive density guardrails: workbench pages should adapt to the
   available viewport and keep operational content ahead of empty chrome. */
@media (max-width: 1180px) {
  .content {
    padding: 18px 20px 28px;
  }

  .content-shell {
    max-width: none;
  }

  .panel-shell,
  .stack,
  .list,
  .chart-stack,
  .detail-body,
  .area-board,
  .grouped-list,
  .crm-side-sections,
  .content-mini-stack {
    gap: 10px;
  }

  .metric-grid,
  .split,
  .detail-meta,
  .detail-columns,
  .form-grid,
  .dashboard-layout,
  .chart-grid,
  .detail-expand-grid,
  .quote-layout,
  .share-grid,
  .product-workspace {
    gap: 12px;
  }

  .topbar {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 20px;
  }

  .topbar-main {
    gap: 6px;
  }

  .workspace-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 16px 18px;
    border-radius: 22px;
  }

  .workspace-strip-copy {
    gap: 5px;
  }

  .workspace-strip-copy h3 {
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.28;
  }

  .workspace-strip-copy p {
    max-width: none;
    font-size: 13px;
    line-height: 1.45;
  }

  .workspace-strip-meta {
    justify-content: flex-start;
    gap: 6px;
  }

  .workspace-strip-chip {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .workspace-mode-row {
    width: 100%;
    margin: 4px 0 12px;
    padding: 5px;
    gap: 6px;
    border-radius: 18px;
  }

  .workspace-mode-button {
    flex: 1 1 120px;
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .section-head,
  .subhead {
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .section-head > :first-child,
  .subhead > :first-child {
    flex-basis: 180px;
    min-width: min(100%, 180px);
  }

  .mini-stats {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 8px;
  }

  .bar-row,
  .mini-card,
  .share-card,
  .list-item,
  .summary-card {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .mini-card strong {
    margin-top: 4px;
    font-size: 18px;
    line-height: 1.1;
  }

  .mini-card .muted,
  .share-card .muted,
  .empty-state {
    font-size: 12px;
    line-height: 1.42;
  }

  .empty-state {
    min-height: 0;
    padding: 10px 12px;
    border: 1px dashed rgba(18, 122, 132, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
  }

  .detail-card {
    min-height: auto;
  }

  #panel-brands .card[data-brand-workspace-view="overview"] {
    display: grid;
    align-content: start;
    gap: 10px;
  }

  #panel-brands .card[data-brand-workspace-view="overview"] .section-head {
    margin-bottom: 2px;
  }

  #brandOpsSummary,
  #brandShareLinks {
    margin-top: 0;
  }

#brandShareLinks.share-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

  #brandShareLinks .procurement-sync-card {
    grid-column: 1 / -1;
  }

  .brand-collab-board {
    gap: 10px;
  }

  .brand-chip-panel {
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
  }

  .brand-chip-list {
    gap: 6px;
  }

  .brand-chip-button {
    min-width: 116px;
    max-width: 168px;
    padding: 7px 9px;
    border-radius: 12px;
  }

  .brand-status-line {
    gap: 5px;
  }

  .brand-status-line span,
  .brand-scope-chips span {
    padding: 4px 7px;
    font-size: 11px;
  }
}

/* Adaptive split guardrails: two-column work areas should only split when
   each resulting column still has enough room for real business content. */
@media (min-width: 721px) {
  .split,
  .split.narrow,
  .crm-board,
  .product-workspace,
  .quote-layout,
  .dashboard-layout {
    --adaptive-split-min: var(--ds-content-split-min-roomy, 400px);
    container-type: inline-size;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--adaptive-split-min)), 1fr));
  }

  .split.narrow {
    --adaptive-split-min: var(--ds-content-split-min-compact, 360px);
  }

  .crm-board {
    --adaptive-split-min: var(--ds-content-split-min-crm, 380px);
  }

  .product-workspace {
    --adaptive-split-min: var(--ds-content-split-min-product, 410px);
  }

  #panel-quotes .quote-layout {
    --adaptive-split-min: var(--ds-content-split-min, 400px);
  }

  #brandWorkspace[data-brand-workspace="orders"],
  #logsWorkspace[data-logs-workspace="questionnaire"],
  .quote-layout[data-quote-workspace-mode="deliver"],
  .quote-layout[data-quote-workspace-mode="library"],
  .product-workspace[data-product-workspace-mode="rules"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 600px) {
  .procurement-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 440px) {
  .procurement-brief-head {
    flex-direction: column;
  }

  .procurement-brief-actions,
  .procurement-customer-switcher {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .procurement-customer-switcher select {
    width: 100%;
  }

  .procurement-brief-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  }
}

@media (max-width: 1090px) {
  .layout {
    min-height: auto;
    align-content: start;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 10px;
    padding: 14px 16px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 18, 27, 0.72);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  }

  .section-head,
  .subhead {
    flex-direction: row;
    align-items: flex-start;
  }

  .section-head > :first-child,
  .subhead > :first-child {
    flex: 1 1 180px;
    min-width: min(100%, 180px);
  }

  .brand {
    gap: 10px;
    padding-right: 92px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .brand h1 {
    font-size: 20px;
    line-height: 1.1;
  }

  .brand p {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.25;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    align-items: center;
    width: 100%;
    gap: 7px;
  }

  .nav-link {
    flex: 0 1 auto;
    display: inline-flex;
    width: auto;
    min-height: 34px;
    padding: 8px 11px 8px 15px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 800;
    text-align: center;
    box-shadow: none;
    backdrop-filter: blur(10px);
  }

  .nav-link::before {
    inset: 8px auto 8px 7px;
    width: 3px;
    height: auto;
    transform: none;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    transform: none;
  }

  .nav-link:hover::before,
  .nav-link.active::before {
    transform: none;
  }

  .nav-link.active {
    animation: none;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 12px;
  }

  .sidebar {
    padding: 12px;
  }

  .brand {
    padding-right: 84px;
  }

  .brand p {
    display: none;
  }

  .nav {
    gap: 6px;
  }

  .nav-link {
    min-height: 32px;
    padding: 7px 9px 7px 13px;
    font-size: 12px;
    border-radius: 11px;
  }

  .workspace-mode-button {
    flex-basis: 100px;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .workspace-strip,
  .card {
    padding: 12px;
    border-radius: 16px;
  }

  .section-head,
  .subhead {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head > :first-child,
  .subhead > :first-child {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }

  .mini-stats,
  .share-grid,
  #brandShareLinks.share-grid {
    grid-template-columns: 1fr;
  }
}

/* Adaptive row guardrails: long names/notes get priority over side metadata.
   Dense business rows change layout by their own container width, not by the
   whole browser width. */
.quote-group,
.quote-group-surface,
.quote-preview-card,
.quote-row-surface {
  container-type: inline-size;
}

.quote-row-main strong,
.quote-row-meta,
.quote-row-note,
.quote-row-summary {
  overflow-wrap: anywhere;
}

@container (max-width: 760px) {
  .quote-row,
  .quote-preview-card .quote-row {
    flex-direction: column;
    gap: 8px;
  }

  .quote-row-actions,
  .quote-preview-card .quote-row-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
    align-items: stretch;
  }

  .quote-row-actions .quote-line-total,
  .quote-row-actions .quote-cost-total,
  .quote-preview-card .quote-row-actions .quote-line-total,
  .quote-preview-card .quote-row-actions .quote-cost-total {
    width: 100%;
    align-self: stretch;
    text-align: center;
  }

  .quote-row-actions .file-actions,
  .quote-preview-card .quote-row-actions .file-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    gap: 6px;
    width: 100%;
  }

  .quote-row-actions .ghost-button,
  .quote-preview-card .quote-row-actions .ghost-button {
    width: 100%;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .metric-grid,
  .detail-meta,
  .mini-stats,
  .assistant-summary-grid,
  .procurement-brief-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .detail-columns,
  .form-grid,
  .workbench-grid,
  .quote-summary-grid,
  .quote-branch-grid,
  .quote-inline-grid,
  .share-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .procurement-brief-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procurement-workbench {
    grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  }

  .procurement-brand-detail .procurement-item-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-brand-detail .procurement-item-select,
  .procurement-brand-detail .procurement-item-main,
  .procurement-brand-detail .procurement-item-facts,
  .procurement-brand-detail .procurement-price-editor,
  .procurement-brand-detail .procurement-item-actions {
    grid-column: 1 / -1;
  }

  .procurement-brand-detail .procurement-price-editor {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  }

  .procurement-brand-detail .procurement-item-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
    gap: 8px;
    width: 100%;
  }

  .procurement-brand-detail .procurement-item-actions .ghost-button {
    width: 100%;
  }

  .procurement-brief-head,
  .procurement-detail-head,
  .procurement-selection-bar {
    flex-direction: row;
    align-items: flex-start;
  }

  .procurement-selection-bar {
    align-items: center;
  }

  .field-combo {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 720px) {
  .procurement-item-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .procurement-item-select,
  .procurement-item-main,
  .procurement-item-facts,
  .procurement-price-editor,
  .procurement-item-actions {
    grid-column: 1 / -1;
  }

  .procurement-price-editor,
  .procurement-item-actions {
    width: 100%;
  }
}

/* Procurement density guardrails: brand order pages can sit inside narrow
   cards even on desktop widths, so their controls must wrap by local space. */
#brandWorkspace[data-brand-workspace="orders"] {
  grid-template-columns: minmax(0, 1fr);
}

.procurement-brief-head,
.procurement-detail-head {
  flex-wrap: wrap;
}

.procurement-brief-head > :first-child,
.procurement-detail-head > :first-child {
  flex: 1 1 260px;
  min-width: min(100%, 220px);
}

.procurement-brief-actions,
.procurement-customer-switcher {
  flex: 1 1 190px;
  min-width: min(100%, 190px);
}

.procurement-brief-actions {
  justify-items: start;
}

.procurement-customer-switcher select {
  width: 100%;
}

@container (max-width: 520px) {
  .procurement-brief-head,
  .procurement-detail-head,
  .procurement-selection-bar {
    flex-direction: column;
  }

  .procurement-brief-head > :first-child,
  .procurement-detail-head > :first-child {
    flex-basis: auto;
  }

  .procurement-brief-actions,
  .procurement-customer-switcher,
  .procurement-selection-bar .file-actions {
    width: 100%;
    min-width: 0;
  }

  .procurement-brief-actions,
  .procurement-selection-bar .file-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
    justify-items: stretch;
  }

  .procurement-brief-actions .ghost-button,
  .procurement-selection-bar .ghost-button {
    width: 100%;
  }
}

/* Dashboard launcher overrides stay after every shared shell breakpoint so
   narrow internal-page navigation can never reshape the homepage. */
body[data-panel="dashboard"] .layout {
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  place-content: center;
  place-items: center;
}

body[data-panel="dashboard"] .sidebar {
  position: relative;
  width: min(100%, 1520px);
  height: auto;
  min-height: 100svh;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "brand"
    "nav";
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: clamp(32px, 5vh, 64px);
  padding: clamp(32px, 5vw, 80px) clamp(28px, 5vw, 72px);
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-panel="dashboard"] .brand {
  grid-area: brand;
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: auto max-content;
  align-self: center;
  align-items: center;
  justify-self: center;
  gap: clamp(16px, 2vw, 26px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-panel="dashboard"] .brand-mark {
  width: clamp(72px, 6vw, 96px);
  height: clamp(72px, 6vw, 96px);
  flex: 0 0 auto;
}

body[data-panel="dashboard"] .brand h1 {
  max-width: none;
  font-size: clamp(44px, 4.6vw, 76px);
  line-height: 1.03;
  white-space: nowrap;
}

body[data-panel="dashboard"] .brand p {
  display: block;
  margin-top: 10px;
  font-size: clamp(15px, 1.2vw, 19px);
  color: rgba(224, 246, 248, 0.74);
}

body[data-panel="dashboard"] .nav {
  grid-area: nav;
  width: min(100%, 1240px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  justify-self: center;
  gap: clamp(16px, 1.55vw, 24px);
}

body[data-panel="dashboard"] .nav-link {
  width: 100%;
  min-height: clamp(130px, 14vh, 172px);
  display: grid;
  place-items: center;
  padding: 32px 24px 36px;
  border-radius: 30px;
  border-color: rgba(166, 246, 241, 0.16);
  font-size: clamp(20px, 1.32vw, 28px);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 151, 255, 0.26), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(89, 240, 218, 0.2), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(55, 98, 137, 0.15) 50%, rgba(8, 27, 42, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(75, 236, 222, 0.08),
    0 26px 60px rgba(0, 8, 14, 0.28);
  backdrop-filter: blur(16px);
}

body[data-panel="dashboard"] .nav-link::before {
  inset: auto 50% 20px auto;
  width: 56px;
  height: 5px;
  transform: translateX(50%);
}

body[data-panel="dashboard"] .nav-link:hover {
  transform: translateY(-8px) scale(1.012);
}

body[data-panel="dashboard"] .nav-link:hover::before {
  transform: translateX(50%) scaleX(1.18);
}

@media (max-width: 1260px) {
  body[data-panel="dashboard"] .sidebar {
    width: min(100%, 1120px);
    min-height: 100svh;
    align-content: center;
    gap: clamp(24px, 4vh, 42px);
    padding: clamp(28px, 5vw, 52px);
  }

  body[data-panel="dashboard"] .brand {
    width: fit-content;
  }

  body[data-panel="dashboard"] .brand-mark {
    width: clamp(62px, 7vw, 82px);
    height: clamp(62px, 7vw, 82px);
  }

  body[data-panel="dashboard"] .brand h1 {
    font-size: clamp(36px, 6vw, 58px);
  }

  body[data-panel="dashboard"] .nav {
    width: min(100%, 840px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 20px);
  }

  body[data-panel="dashboard"] .nav-link {
    min-height: clamp(92px, 12vh, 116px);
    padding: 24px 20px 30px;
    border-radius: 24px;
    font-size: clamp(17px, 2.2vw, 22px);
  }
}

@media (max-width: 560px) {
  body[data-panel="dashboard"] .sidebar {
    min-height: 100svh;
    gap: 20px;
    padding: 22px 16px;
  }

  body[data-panel="dashboard"] .brand {
    width: fit-content;
    grid-template-columns: auto max-content;
    gap: 12px;
    padding: 0;
  }

  body[data-panel="dashboard"] .brand-mark {
    width: 52px;
    height: 52px;
  }

  body[data-panel="dashboard"] .brand h1 {
    font-size: clamp(25px, 7vw, 31px);
    white-space: nowrap;
  }

  body[data-panel="dashboard"] .brand p {
    display: none;
  }

  body[data-panel="dashboard"] .nav {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-panel="dashboard"] .nav-link {
    width: 100%;
    min-height: 74px;
    padding: 16px 10px 20px;
    border-radius: 18px;
    font-size: 14px;
  }

  body[data-panel="dashboard"] .nav-link::before {
    inset: auto 50% 12px auto;
    width: 36px;
    height: 4px;
    transform: translateX(50%);
  }

  body[data-panel="dashboard"] .nav-link:hover {
    transform: translateY(-3px);
  }
}

/* Quote preview density pass: keep the editable delivery preview readable
   without letting summary cards and row actions dominate narrow screens. */
.quote-preview-card #quoteDraft {
  gap: 10px;
}

.quote-preview-card .quote-cover {
  padding: 14px;
  border-radius: 18px;
}

.quote-preview-card .quote-cover-crest {
  gap: 10px;
  margin-bottom: 12px;
}

.quote-preview-card .quote-cover-mark {
  width: 50px;
  height: 50px;
}

.quote-preview-card .quote-cover-note {
  gap: 3px;
}

.quote-preview-card .quote-cover-band {
  gap: 12px;
}

.quote-preview-card .quote-cover-chip {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0;
}

.quote-preview-card .quote-cover-ribbon {
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.quote-preview-card .quote-summary-grid {
  gap: 7px;
  margin-top: 10px;
}

.quote-preview-card .quote-summary-grid-primary .summary-card {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 11px;
}

.quote-preview-card .quote-summary-grid .summary-card strong {
  margin-top: 2px;
  font-size: 15px;
}

.quote-preview-card .quote-sort-note {
  margin-top: 10px;
  padding: 10px 12px;
  line-height: 1.45;
}

.quote-preview-card .quote-group {
  padding: 14px;
}

.quote-preview-card .quote-section-banner {
  gap: 10px;
  margin-bottom: 10px;
}

.quote-preview-card .quote-group-number {
  width: 50px;
  min-height: 50px;
  border-radius: 14px;
}

.quote-preview-card .quote-category-divider {
  margin: 10px 0 0;
  padding: 8px 10px;
}

.quote-preview-card .quote-row {
  gap: 10px;
  padding: 10px 0;
}

.quote-preview-card .quote-row-summary {
  gap: 5px;
}

.quote-preview-card .quote-row-meta {
  line-height: 1.4;
}

.quote-preview-card .quote-row-note {
  padding: 8px 10px;
  border-radius: 12px;
  line-height: 1.4;
}

.quote-preview-card .quote-row-chipline {
  gap: 6px;
}

.quote-preview-card .quote-row-actions {
  min-width: 0;
  gap: 6px;
}

.quote-preview-card .quote-line-total,
.quote-preview-card .quote-cost-total {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: none;
}

@media (min-width: 721px) and (max-width: 980px) {
  .quote-preview-card .quote-summary-grid-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-preview-card .quote-summary-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-preview-card .quote-row {
    flex-direction: row;
  }

  .quote-preview-card .quote-row-actions {
    width: min(240px, 36%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-preview-card .quote-row-actions .quote-line-total,
  .quote-preview-card .quote-row-actions .quote-cost-total {
    width: 100%;
  }

  .quote-preview-card .quote-row-actions .file-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .quote-preview-card .quote-row-actions .file-actions .ghost-button {
    width: 100%;
    min-height: 30px;
    padding: 6px 7px;
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .quote-preview-card .quote-cover {
    padding: 12px;
  }

  .quote-preview-card .quote-cover-band,
  .quote-preview-card .quote-cover-ribbon {
    gap: 8px;
  }

  .quote-preview-card .quote-cover-badges {
    gap: 6px;
  }

  .quote-preview-card .quote-summary-grid-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-preview-card .quote-summary-grid-secondary {
    grid-template-columns: 1fr;
  }

  .quote-preview-card .quote-summary-grid-primary .summary-card {
    min-height: 44px;
  }

  .quote-preview-card .quote-sort-note {
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.42;
  }

  .quote-preview-card .quote-group {
    padding: 12px;
  }

  .quote-preview-card .quote-section-banner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .quote-preview-card .quote-section-banner .pill {
    grid-column: 2;
    justify-self: start;
  }

  .quote-preview-card .quote-group-number {
    width: 46px;
    min-height: 46px;
  }

  .quote-preview-card .quote-row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .quote-preview-card .quote-line-total {
    grid-column: span 2;
    width: 100%;
  }

  .quote-preview-card .quote-cost-total {
    grid-column: span 1;
    width: 100%;
    align-self: stretch;
    text-align: center;
  }

  .quote-preview-card .quote-row-actions .ghost-button {
    width: 100%;
    min-height: 30px;
    padding: 6px 7px;
    font-size: 12px;
  }

  .quote-preview-card .quote-row-actions .file-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
}
.compliance-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ds-space-2) var(--ds-space-7);
  margin-top: var(--ds-space-10);
  padding: var(--ds-space-7) var(--ds-space-6) var(--ds-space-10);
  border-top: 1px solid var(--ds-line);
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
  text-align: center;
}

.compliance-footer span {
  flex-basis: 100%;
  color: var(--ds-ink);
  font-weight: 700;
}

.compliance-footer a {
  color: inherit;
  text-decoration: none;
}

.compliance-footer a:hover,
.compliance-footer a:focus-visible {
  color: var(--ds-brand-blue);
  text-decoration: underline;
}

/* Internal account authentication and capability management. */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: var(--ds-space-10);
  background:
    radial-gradient(circle at 16% 12%, var(--ds-accent-bright-soft), transparent 34%),
    radial-gradient(circle at 88% 82%, var(--ds-brand-blue-soft), transparent 38%),
    linear-gradient(145deg, var(--ds-bg-deep), var(--ds-bg));
}

.auth-gate[hidden] {
  display: none !important;
}

body.auth-pending,
body.auth-required {
  overflow: hidden;
}

.auth-shell {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: var(--ds-space-12);
  align-items: center;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--ds-sidebar-line);
  border-radius: var(--ds-radius-xl);
  background: rgba(7, 24, 33, 0.9);
  box-shadow: var(--ds-shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
}

.auth-brand {
  display: grid;
  gap: var(--ds-space-8);
  color: #f4ffff;
}

.auth-brand img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px var(--ds-glow-primary));
}

.auth-brand span {
  display: block;
  margin-bottom: var(--ds-space-3);
  color: var(--ds-mint);
  font-size: var(--ds-text-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
}

.auth-brand h1 {
  margin: 0;
  color: #f8ffff;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: var(--ds-leading-tight);
}

.auth-brand p {
  max-width: 32ch;
  margin: var(--ds-space-4) 0 0;
  color: rgba(232, 255, 255, 0.7);
  font-size: var(--ds-text-md);
  line-height: var(--ds-leading-body);
}

.auth-form {
  display: grid;
  gap: var(--ds-space-6);
  min-width: 0;
  padding: var(--ds-space-10);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-paper-strong);
  box-shadow: var(--ds-shadow-card), var(--ds-shadow-inset);
  color: var(--ds-ink-strong);
}

.auth-form-heading {
  display: grid;
  gap: var(--ds-space-2);
}

.auth-form-heading strong {
  font-size: var(--ds-title-card);
}

.auth-form-heading span {
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
}

.auth-form label,
.security-section label,
.account-form label,
.account-form-field,
.role-template-form label {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-xs);
  font-weight: 700;
}

.auth-form input,
.security-section input,
.account-form input,
.account-form select,
.role-template-form input,
.role-template-form textarea {
  width: 100%;
  min-width: 0;
  border-radius: var(--ds-radius-md);
}

.auth-status,
.auth-setup-notice,
.inline-form-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
  line-height: 1.55;
}

.auth-status.error,
.inline-form-status.error {
  color: var(--ds-danger);
}

.auth-status.success,
.inline-form-status.success {
  color: var(--ds-ok);
}

.auth-setup-notice {
  padding: var(--ds-space-4);
  border: 1px solid color-mix(in srgb, var(--ds-warn) 32%, transparent);
  border-radius: var(--ds-radius-md);
  background: color-mix(in srgb, var(--ds-warn) 10%, transparent);
  color: #7b591c;
}

.session-user-card {
  display: grid;
  gap: var(--ds-space-4);
  margin-top: auto;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-sidebar-line);
  border-radius: var(--ds-radius-nav);
  background: rgba(255, 255, 255, 0.045);
  color: #f4ffff;
}

.session-user-card > div:first-child {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.session-user-card strong,
.session-user-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-user-card span {
  color: rgba(226, 255, 255, 0.64);
  font-size: var(--ds-text-xs);
}

.session-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.session-user-actions button {
  flex: 1 1 80px;
  min-height: 34px;
  padding: 7px 10px;
  border-color: var(--ds-sidebar-line);
  background: rgba(255, 255, 255, 0.06);
  color: #eaffff;
  font-size: var(--ds-text-xs);
}

.account-management-shell {
  container: account-shell / inline-size;
}

.account-management-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.22fr);
  gap: var(--ds-space-7);
  min-width: 0;
}

.account-list-surface,
.account-editor-surface,
.account-audit-surface {
  min-width: 0;
  overflow: clip;
}

.account-list {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: var(--ds-space-3);
}

.account-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ds-space-4);
  align-items: center;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: color-mix(in srgb, var(--ds-surface-clean) 84%, transparent);
  color: var(--ds-ink-strong);
  text-align: left;
  box-shadow: none;
}

.account-row:hover,
.account-row:focus-visible,
.account-row.active {
  border-color: var(--ds-line-strong);
  background: var(--ds-surface-clean);
  transform: translateY(-1px);
}

.account-row.active {
  box-shadow: inset 4px 0 0 var(--ds-cyan);
}

.account-row-main {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.account-row-main strong,
.account-row-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row-main span {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

.account-row-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--ds-space-2);
}

.account-form {
  display: grid;
  gap: var(--ds-space-7);
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ds-grid-min-form)), 1fr));
  gap: var(--ds-space-5);
}

.account-form-grid .full {
  grid-column: 1 / -1;
}

.account-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
}

.account-field-action {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ds-accent-strong);
  font-size: var(--ds-text-xs);
  font-weight: 800;
}

.account-field-action:hover,
.account-field-action:focus-visible {
  background: transparent;
  color: var(--ds-brand-blue);
  transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-role-field small {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
  font-weight: 500;
  line-height: 1.45;
}

.account-permission-heading {
  display: grid;
  gap: var(--ds-space-1);
}

.account-permission-heading span {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

.account-permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--ds-space-4);
}

.account-permission-group {
  display: grid;
  align-content: start;
  gap: var(--ds-space-3);
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-paper-soft);
}

.account-permission-group > strong {
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-sm);
}

.account-permission-option {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--ds-space-3) !important;
  align-items: start;
  font-weight: 600 !important;
  line-height: 1.4;
}

.account-permission-option input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.account-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
}

.danger-button {
  border-color: color-mix(in srgb, var(--ds-danger) 32%, transparent) !important;
  color: var(--ds-danger) !important;
}

.account-audit-list {
  display: grid;
  gap: var(--ds-space-2);
}

.account-audit-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(210px, 1fr) auto;
  gap: var(--ds-space-5);
  align-items: center;
  padding: var(--ds-space-4) 0;
  border-bottom: 1px solid var(--ds-line);
  color: var(--ds-ink-strong);
  font-size: var(--ds-text-sm);
}

.account-audit-row:last-child {
  border-bottom: 0;
}

.account-audit-row span:last-child {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
  text-align: right;
}

.security-dialog {
  width: min(860px, calc(100vw - 32px));
}

.role-template-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
}

.role-template-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.58fr) minmax(0, 1.42fr);
  gap: var(--ds-space-7);
  min-width: 0;
  padding: 0 26px 26px;
}

.role-template-list-surface,
.role-template-form {
  min-width: 0;
}

.role-template-list-surface {
  padding-right: var(--ds-space-7);
  border-right: 1px solid var(--ds-line);
}

.role-template-list,
.role-template-form {
  display: grid;
  align-content: start;
  gap: var(--ds-space-5);
}

.role-template-row {
  width: 100%;
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-md);
  background: color-mix(in srgb, var(--ds-surface-clean) 78%, transparent);
  color: var(--ds-ink-strong);
  text-align: left;
  box-shadow: none;
}

.role-template-row:hover,
.role-template-row:focus-visible,
.role-template-row.active {
  border-color: var(--ds-line-strong);
  background: var(--ds-surface-clean);
  transform: translateY(-1px);
}

.role-template-row.active {
  box-shadow: inset 4px 0 0 var(--ds-cyan);
}

.role-template-row strong,
.role-template-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-template-row span {
  color: var(--ds-muted);
  font-size: var(--ds-text-xs);
}

.role-template-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(240px, 1.28fr);
  gap: var(--ds-space-5);
}

.role-template-form textarea {
  min-height: 86px;
  resize: vertical;
  border-radius: var(--ds-radius-md);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--ds-space-7);
}

.security-section,
.security-section form {
  display: grid;
  align-content: start;
  gap: var(--ds-space-5);
}

.security-section {
  padding: var(--ds-space-7);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-paper-strong);
}

.security-section h4,
.security-section p {
  margin: 0;
}

.security-section p {
  margin-top: var(--ds-space-2);
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
  line-height: 1.55;
}

.totp-setup-result {
  display: grid;
  gap: var(--ds-space-4);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--ds-line);
}

.totp-setup-result code {
  overflow-wrap: anywhere;
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  background: var(--ds-bg-aqua);
  color: var(--ds-ink-strong);
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-sm);
  line-height: 1.6;
}

.permission-readonly-note {
  margin-bottom: var(--ds-space-5);
  padding: var(--ds-space-4) var(--ds-space-5);
  border: 1px solid color-mix(in srgb, var(--ds-warn) 28%, transparent);
  border-radius: var(--ds-radius-md);
  background: color-mix(in srgb, var(--ds-warn) 8%, var(--ds-paper-strong));
  color: #6f511a;
  font-size: var(--ds-text-sm);
  font-weight: 700;
}

.panel-readonly form[data-permission-form-disabled] :is(input, select, textarea, button[type="submit"]) {
  opacity: 0.58;
  pointer-events: none;
}

@container account-shell (max-width: 820px) {
  .account-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-gate {
    align-items: start;
    padding: var(--ds-space-6);
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: var(--ds-space-7);
    padding: var(--ds-space-7);
  }

  .auth-brand {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--ds-space-5);
  }

  .auth-brand img {
    width: 56px;
    height: 56px;
  }

  .auth-brand h1 {
    font-size: 28px;
  }

  .auth-brand p {
    grid-column: 1 / -1;
    max-width: none;
  }

  .auth-form {
    padding: var(--ds-space-7);
  }

  .account-audit-row {
    grid-template-columns: 1fr;
    gap: var(--ds-space-1);
  }

  .account-audit-row span:last-child {
    text-align: left;
  }

  .role-template-workspace,
  .role-template-form-grid {
    grid-template-columns: 1fr;
  }

  .role-template-workspace {
    padding: 0 var(--ds-space-5) var(--ds-space-5);
  }

  .role-template-list-surface {
    padding-right: 0;
    padding-bottom: var(--ds-space-6);
    border-right: 0;
    border-bottom: 1px solid var(--ds-line);
  }
}
