:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: #0c1414;
  --panel-2: #111c1b;
  --line: rgba(216, 155, 47, 0.34);
  --line-soft: rgba(255, 255, 255, 0.1);
  --text: #f5f0e8;
  --muted: #c8bfb4;
  --quiet: #8e9792;
  --gold: #d89b2f;
  --gold-2: #f0c168;
  --red: #9d4d43;
  --green: #4c8a62;
  --blue: #5c7485;
  --max: 1500px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

/* Stage A2A: concise operator CEIG start view. Staging-only and URL-gated. */
#portal .a2a-admin-start {
  display: grid;
  gap: 18px;
  min-width: 0;
  color: #f5f5f1;
}

#portal .a2a-admin-start button {
  font: inherit;
  letter-spacing: 0;
}

#portal .a2a-today-head,
#portal .a2a-section-head,
#portal .a2a-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

#portal .a2a-today-head > div,
#portal .a2a-section-head > div,
#portal .a2a-next-step > div {
  min-width: 0;
}

#portal .a2a-today-head span,
#portal .a2a-section-head span,
#portal .a2a-next-step > div > span {
  display: block;
  margin-bottom: 5px;
  color: #e8bd6b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2a-today-head h3,
#portal .a2a-section-head h3,
#portal .a2a-next-step h3 {
  margin: 0;
  color: #ffffff;
  letter-spacing: 0;
}

#portal .a2a-today-head h3 {
  font-size: 27px;
  line-height: 1.15;
}

#portal .a2a-today-head p,
#portal .a2a-next-step p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #b9bdb9;
  line-height: 1.55;
}

#portal .a2a-primary-action,
#portal .a2a-next-step > button {
  flex: 0 0 auto;
  min-height: 44px;
  max-width: 260px;
  padding: 10px 15px;
  border: 1px solid #d6a84d;
  border-radius: 6px;
  background: #d6a84d;
  color: #090a09;
  font-weight: 850;
  cursor: pointer;
  white-space: normal;
}

#portal .a2a-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(231, 188, 105, 0.2);
  border-radius: 7px;
  background: #101312;
  overflow: hidden;
}

#portal .a2a-metrics button {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #f3f3ef;
  text-align: left;
  cursor: pointer;
}

#portal .a2a-metrics button:last-child {
  border-right: 0;
}

#portal .a2a-metrics button:hover,
#portal .a2a-metrics button:focus-visible {
  background: #171915;
  outline: 2px solid rgba(230, 188, 101, 0.42);
  outline-offset: -2px;
}

#portal .a2a-metrics strong {
  color: #f1c875;
  font-size: 27px;
  line-height: 1;
}

#portal .a2a-metrics span {
  margin-top: 8px;
  font-weight: 800;
}

#portal .a2a-metrics small,
#portal .a2a-priority-list small,
#portal .a2a-deadline-list small,
#portal .a2a-activity-list small {
  color: #aeb2ae;
  overflow-wrap: anywhere;
}

#portal .a2a-next-step {
  padding: 20px;
  border: 1px solid rgba(230, 188, 101, 0.42);
  border-left: 4px solid #d6a84d;
  border-radius: 7px;
  background: #151712;
}

#portal .a2a-process-band,
#portal .a2a-content-band {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #101312;
}

#portal .a2a-section-head {
  margin-bottom: 15px;
}

#portal .a2a-section-head h3 {
  font-size: 18px;
}

#portal .a2a-section-head > button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(230, 188, 101, 0.35);
  border-radius: 6px;
  background: #171814;
  color: #efc975;
  font-weight: 780;
  cursor: pointer;
  white-space: normal;
}

#portal .a2a-process-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

#portal .a2a-process-flow button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 58px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #0b0d0c;
  color: #e8eae6;
  text-align: left;
  cursor: pointer;
}

#portal .a2a-process-flow b {
  color: #ddb45e;
  font-size: 11px;
}

#portal .a2a-process-flow span {
  min-width: 0;
  font-weight: 760;
  overflow-wrap: anywhere;
}

#portal .a2a-process-flow small {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #24251e;
  color: #f4cf82;
  font-weight: 850;
}

#portal .a2a-priority-list,
#portal .a2a-deadline-list,
#portal .a2a-activity-list {
  display: grid;
  min-width: 0;
}

#portal .a2a-priority-list button,
#portal .a2a-deadline-list button,
#portal .a2a-activity-list article {
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #f4f4ef;
  text-align: left;
}

#portal .a2a-priority-list button {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
}

#portal .a2a-priority-list b {
  color: #d7ae5d;
  font-size: 12px;
}

#portal .a2a-priority-list span,
#portal .a2a-deadline-list span,
#portal .a2a-activity-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#portal .a2a-priority-list strong,
#portal .a2a-deadline-list strong,
#portal .a2a-activity-list strong {
  overflow-wrap: anywhere;
}

#portal .a2a-priority-list em {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  border: 1px solid rgba(224, 180, 92, 0.34);
  border-radius: 50%;
  color: #f2ca78;
  font-style: normal;
  font-weight: 850;
}

#portal .a2a-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

#portal .a2a-deadline-list button {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 3px;
  cursor: pointer;
}

#portal .a2a-deadline-list time,
#portal .a2a-activity-list time {
  color: #d8ba78;
  font-size: 12px;
  white-space: nowrap;
}

#portal .a2a-activity-list article {
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 3px;
}

#portal .a2a-activity-list i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d7ae5d;
}

#portal .a2a-priority-list button:hover,
#portal .a2a-priority-list button:focus-visible,
#portal .a2a-deadline-list button:hover,
#portal .a2a-deadline-list button:focus-visible,
#portal .a2a-process-flow button:hover,
#portal .a2a-process-flow button:focus-visible {
  background: #171915;
  outline: none;
}

@media (max-width: 980px) {
  #portal .a2a-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #portal .a2a-metrics button:nth-child(2) {
    border-right: 0;
  }

  #portal .a2a-metrics button:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #portal .a2a-process-flow {
    grid-template-columns: 1fr;
  }

  #portal .a2a-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  #portal .a2a-admin-start {
    gap: 12px;
  }

  #portal .a2a-today-head,
  #portal .a2a-section-head,
  #portal .a2a-next-step {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2a-today-head h3 {
    font-size: 23px;
  }

  #portal .a2a-primary-action,
  #portal .a2a-next-step > button,
  #portal .a2a-section-head > button {
    width: 100%;
    max-width: none;
  }

  #portal .a2a-metrics {
    grid-template-columns: 1fr;
  }

  #portal .a2a-metrics button {
    min-height: 91px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #portal .a2a-metrics button:last-child {
    border-bottom: 0;
  }

  #portal .a2a-process-band,
  #portal .a2a-content-band,
  #portal .a2a-next-step {
    padding: 15px;
  }

  #portal .a2a-priority-list button {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
  }

  #portal .a2a-deadline-list button,
  #portal .a2a-activity-list article {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a2a-activity-list i {
    display: none;
  }

  #portal .a2a-deadline-list time,
  #portal .a2a-activity-list time {
    white-space: normal;
  }
}

/* R6: prośba o demo i kolejka decyzji; bez publicznego wejścia do demo. */
.demo-request-section {
  scroll-margin-top: 92px;
}

.demo-request-form {
  max-width: 840px;
  margin-inline: auto;
}

.demo-request-form :where(input, select, textarea),
#portal .demo-request-decision :where(input, select, textarea) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.demo-request-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.demo-request-explainer {
  margin: 8px 0 18px;
  color: #b9c2be;
  line-height: 1.5;
}

.demo-request-form .form-status[data-tone="error"],
#portal .demo-requests-admin .form-status[data-tone="error"] {
  color: #ffd0c8;
}

.demo-request-form .form-status[data-tone="success"] {
  color: #d5f1bd;
}

#portal .demo-request-admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  min-width: 0;
}

#portal .demo-request-admin-grid > * {
  min-width: 0;
}

#portal .demo-request-queue {
  display: grid;
  gap: 8px;
}

#portal .demo-request-row {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #11191a;
  color: #f2eee5;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

#portal .demo-request-row.active,
#portal .demo-request-row:focus-visible {
  border-color: #d5b675;
  outline: 2px solid #d5b675;
  outline-offset: 2px;
}

#portal .demo-request-facts {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

#portal .demo-request-facts > div {
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
}

#portal .demo-request-facts dt {
  color: #b9c2be;
  font-size: 0.85rem;
}

#portal .demo-request-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

#portal .demo-request-decision {
  display: grid;
  gap: 12px;
}

#portal .demo-request-decision label {
  display: grid;
  gap: 5px;
}

#portal .demo-request-warning {
  padding: 12px;
  border: 1px solid #d5b675;
  border-radius: 8px;
  color: #f2dfae;
}

#portal .demo-request-confirmation {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border: 2px solid #d5b675;
  border-radius: 8px;
  background: #171c1a;
}

#portal .demo-request-confirmation :where(h4, p) {
  margin: 0;
}

#portal .demo-request-confirmation [data-demo-request-confirm]:focus-visible {
  outline: 3px solid #fff3c8;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  #portal .demo-request-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .demo-request-decision .mini-actions,
  #portal .demo-request-confirmation .mini-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .demo-request-decision .mini-actions button,
  #portal .demo-request-confirmation .mini-actions button {
    width: 100%;
  }
}

/* Stage A2E: client start. Staging-only and URL-gated. */
#portal .a2e-client-start {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f7f3eb;
}

#portal .a2e-client-start button {
  font: inherit;
  letter-spacing: 0;
}

#portal .a2e-client-head {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(240, 193, 104, 0.34);
  border-radius: 7px;
  background: #0d0f0f;
}

#portal .a2e-client-head > div,
#portal .a2e-client-project-head > div,
#portal .a2e-client-section-head > div,
#portal .a2e-client-next,
#portal .a2e-client-update-list span {
  min-width: 0;
}

#portal .a2e-client-head > div > span,
#portal .a2e-client-next > span,
#portal .a2e-client-section-head > div > span,
#portal .a2e-client-empty > span {
  color: #f0c168;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2e-client-head h3,
#portal .a2e-client-project-head h3,
#portal .a2e-client-next h3,
#portal .a2e-client-section-head h3,
#portal .a2e-client-empty h3 {
  margin: 5px 0;
  color: #ffffff;
  letter-spacing: 0;
}

#portal .a2e-client-head p,
#portal .a2e-client-project-head p,
#portal .a2e-client-next p,
#portal .a2e-client-empty p {
  margin: 0;
  color: #c9cdc8;
  line-height: 1.52;
}

#portal .a2e-client-primary,
#portal .a2e-client-project-head > button,
#portal .a2e-client-next > button,
#portal .a2e-client-empty > button {
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid #f0c168;
  border-radius: 6px;
  background: #f0c168;
  color: #17130d;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
}

#portal .a2e-client-primary:hover,
#portal .a2e-client-primary:focus-visible,
#portal .a2e-client-project-head > button:hover,
#portal .a2e-client-project-head > button:focus-visible,
#portal .a2e-client-next > button:hover,
#portal .a2e-client-next > button:focus-visible,
#portal .a2e-client-empty > button:hover,
#portal .a2e-client-empty > button:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  outline: none;
}

#portal .a2e-client-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2e-client-metrics button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  min-width: 0;
  min-height: 84px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2e-client-metrics button:hover,
#portal .a2e-client-metrics button:focus-visible,
#portal .a2e-client-update-list button:hover,
#portal .a2e-client-update-list button:focus-visible,
#portal .a2e-client-shortcuts button:hover,
#portal .a2e-client-shortcuts button:focus-visible {
  border-color: rgba(240, 193, 104, 0.66);
  background: #171816;
  outline: none;
}

#portal .a2e-client-metrics strong {
  grid-row: 1 / span 2;
  color: #f0c168;
  font-size: 29px;
  line-height: 1;
}

#portal .a2e-client-metrics span {
  overflow-wrap: anywhere;
  font-weight: 780;
}

#portal .a2e-client-metrics small {
  color: #aeb4ae;
}

#portal .a2e-client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  min-width: 0;
}

#portal .a2e-client-project,
#portal .a2e-client-updates,
#portal .a2e-client-empty {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #0e1010;
}

#portal .a2e-client-project-head,
#portal .a2e-client-section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

#portal .a2e-client-project-head > button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(240, 193, 104, 0.44);
  background: transparent;
  color: #f0c168;
}

#portal .a2e-client-status {
  display: inline-flex;
  margin-right: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(240, 193, 104, 0.34);
  border-radius: 999px;
  background: rgba(240, 193, 104, 0.1);
  color: #f0c168;
  font-size: 11px;
  font-weight: 800;
}

#portal .a2e-client-project-head small,
#portal .a2e-client-section-head > small {
  color: #aeb4ae;
  overflow-wrap: anywhere;
}

#portal .a2e-client-next {
  margin: 20px 0;
  padding: 18px;
  border-left: 3px solid #f0c168;
  background: #161612;
}

#portal .a2e-client-next > button {
  margin-top: 14px;
}

#portal .a2e-client-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#portal .a2e-client-facts article {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#portal .a2e-client-facts span,
#portal .a2e-client-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2e-client-facts span {
  margin-bottom: 4px;
  color: #aeb4ae;
  font-size: 11px;
}

#portal .a2e-client-facts strong {
  color: #ffffff;
  font-size: 14px;
}

#portal .a2e-client-section-head {
  align-items: center;
  margin-bottom: 12px;
}

#portal .a2e-client-section-head h3 {
  font-size: 17px;
}

#portal .a2e-client-update-list {
  display: grid;
  gap: 7px;
}

#portal .a2e-client-update-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2e-client-update-list strong,
#portal .a2e-client-update-list small {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2e-client-update-list small,
#portal .a2e-client-update-list time,
#portal .a2e-client-update-list > p {
  color: #aeb4ae;
  font-style: normal;
}

#portal .a2e-client-update-list time {
  font-size: 11px;
  white-space: nowrap;
}

#portal .a2e-client-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2e-client-shortcuts button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 72px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2e-client-shortcuts strong,
#portal .a2e-client-shortcuts span {
  overflow-wrap: anywhere;
}

#portal .a2e-client-shortcuts span {
  color: #bfc4bf;
  font-size: 12px;
  line-height: 1.42;
}

@media (max-width: 1040px) {
  #portal .a2e-client-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2e-client-facts,
  #portal .a2e-client-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #portal .a2e-client-head,
  #portal .a2e-client-project-head,
  #portal .a2e-client-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2e-client-head,
  #portal .a2e-client-project,
  #portal .a2e-client-updates,
  #portal .a2e-client-empty {
    padding: 16px;
  }

  #portal .a2e-client-head > button,
  #portal .a2e-client-project-head > button,
  #portal .a2e-client-next > button,
  #portal .a2e-client-empty > button {
    width: 100%;
  }

  #portal .a2e-client-metrics,
  #portal .a2e-client-facts,
  #portal .a2e-client-shortcuts {
    grid-template-columns: 1fr;
  }

  #portal .a2e-client-update-list button {
    grid-template-columns: 1fr;
  }

  #portal .a2e-client-update-list time {
    white-space: normal;
  }
}

/* Stage A2F: factory start. Staging-only and URL-gated. */
#portal .a2f-factory-start {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f7f3eb;
}

#portal .a2f-factory-start button {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

#portal .a2f-factory-head {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(240, 193, 104, 0.34);
  border-radius: 7px;
  background: #0d0f0f;
}

#portal .a2f-factory-head > div,
#portal .a2f-factory-scope-head > div,
#portal .a2f-factory-section-head > div,
#portal .a2f-factory-next,
#portal .a2f-factory-update-list span {
  min-width: 0;
}

#portal .a2f-factory-head > div > span,
#portal .a2f-factory-next > span,
#portal .a2f-factory-section-head > div > span,
#portal .a2f-factory-empty > span {
  color: #f0c168;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2f-factory-head h3,
#portal .a2f-factory-scope-head h3,
#portal .a2f-factory-next h3,
#portal .a2f-factory-section-head h3,
#portal .a2f-factory-empty h3 {
  margin: 5px 0;
  color: #ffffff;
  letter-spacing: 0;
}

#portal .a2f-factory-head p,
#portal .a2f-factory-scope-head p,
#portal .a2f-factory-next p,
#portal .a2f-factory-empty p {
  margin: 0;
  color: #c9cdc8;
  line-height: 1.52;
}

#portal .a2f-factory-primary,
#portal .a2f-factory-scope-head > button,
#portal .a2f-factory-next > button,
#portal .a2f-factory-empty > button {
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid #f0c168;
  border-radius: 6px;
  background: #f0c168;
  color: #17130d;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
}

#portal .a2f-factory-primary:hover,
#portal .a2f-factory-primary:focus-visible,
#portal .a2f-factory-scope-head > button:hover,
#portal .a2f-factory-scope-head > button:focus-visible,
#portal .a2f-factory-next > button:hover,
#portal .a2f-factory-next > button:focus-visible,
#portal .a2f-factory-empty > button:hover,
#portal .a2f-factory-empty > button:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  outline: none;
}

#portal .a2f-factory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2f-factory-metrics button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  min-height: 84px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2f-factory-metrics button:hover,
#portal .a2f-factory-metrics button:focus-visible,
#portal .a2f-factory-update-list button:hover,
#portal .a2f-factory-update-list button:focus-visible,
#portal .a2f-factory-shortcuts button:hover,
#portal .a2f-factory-shortcuts button:focus-visible {
  border-color: rgba(240, 193, 104, 0.66);
  background: #171816;
  outline: none;
}

#portal .a2f-factory-metrics strong {
  grid-row: 1 / span 2;
  color: #f0c168;
  font-size: 29px;
  line-height: 1;
}

#portal .a2f-factory-metrics span {
  overflow-wrap: anywhere;
  font-weight: 780;
}

#portal .a2f-factory-metrics small {
  color: #aeb4ae;
}

#portal .a2f-factory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  min-width: 0;
}

#portal .a2f-factory-scope,
#portal .a2f-factory-updates,
#portal .a2f-factory-empty {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #0e1010;
}

#portal .a2f-factory-scope-head,
#portal .a2f-factory-section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

#portal .a2f-factory-scope-head > button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(240, 193, 104, 0.44);
  background: transparent;
  color: #f0c168;
}

#portal .a2f-factory-status {
  display: inline-flex;
  margin-right: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(240, 193, 104, 0.34);
  border-radius: 999px;
  background: rgba(240, 193, 104, 0.1);
  color: #f0c168;
  font-size: 11px;
  font-weight: 800;
}

#portal .a2f-factory-scope-head small,
#portal .a2f-factory-section-head > small {
  color: #aeb4ae;
  overflow-wrap: anywhere;
}

#portal .a2f-factory-next {
  margin: 20px 0;
  padding: 18px;
  border-left: 3px solid #f0c168;
  background: #161612;
}

#portal .a2f-factory-next > button {
  margin-top: 14px;
}

#portal .a2f-factory-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#portal .a2f-factory-facts article {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#portal .a2f-factory-facts span,
#portal .a2f-factory-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2f-factory-facts span {
  margin-bottom: 4px;
  color: #aeb4ae;
  font-size: 11px;
}

#portal .a2f-factory-facts strong {
  color: #ffffff;
  font-size: 14px;
}

#portal .a2f-factory-section-head {
  align-items: center;
  margin-bottom: 12px;
}

#portal .a2f-factory-section-head h3 {
  font-size: 17px;
}

#portal .a2f-factory-update-list {
  display: grid;
  gap: 7px;
}

#portal .a2f-factory-update-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2f-factory-update-list strong,
#portal .a2f-factory-update-list small {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2f-factory-update-list small,
#portal .a2f-factory-update-list time,
#portal .a2f-factory-update-list > p {
  color: #aeb4ae;
  font-style: normal;
}

#portal .a2f-factory-update-list time {
  font-size: 11px;
  white-space: nowrap;
}

#portal .a2f-factory-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2f-factory-shortcuts button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2f-factory-shortcuts strong,
#portal .a2f-factory-shortcuts span {
  overflow-wrap: anywhere;
}

#portal .a2f-factory-shortcuts span {
  color: #bfc4bf;
  font-size: 12px;
  line-height: 1.42;
}

@media (max-width: 1040px) {
  #portal .a2f-factory-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2f-factory-facts,
  #portal .a2f-factory-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #portal .a2f-factory-head,
  #portal .a2f-factory-scope-head,
  #portal .a2f-factory-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2f-factory-head,
  #portal .a2f-factory-scope,
  #portal .a2f-factory-updates,
  #portal .a2f-factory-empty {
    padding: 16px;
  }

  #portal .a2f-factory-head > button,
  #portal .a2f-factory-scope-head > button,
  #portal .a2f-factory-next > button,
  #portal .a2f-factory-empty > button {
    width: 100%;
  }

  #portal .a2f-factory-metrics,
  #portal .a2f-factory-facts,
  #portal .a2f-factory-shortcuts {
    grid-template-columns: 1fr;
  }

  #portal .a2f-factory-update-list button {
    grid-template-columns: 1fr;
  }

  #portal .a2f-factory-update-list time {
    white-space: normal;
  }
}

/* Stage A2G: designer start. Staging-only and URL-gated. */
#portal .a2g-designer-start {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f7f3eb;
}

#portal .a2g-designer-start button {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

#portal .a2g-designer-head {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(240, 193, 104, 0.34);
  border-radius: 7px;
  background: #0d0f0f;
}

#portal .a2g-designer-head > div,
#portal .a2g-designer-project-head > div,
#portal .a2g-designer-section-head > div,
#portal .a2g-designer-next,
#portal .a2g-designer-update-list span {
  min-width: 0;
}

#portal .a2g-designer-head > div > span,
#portal .a2g-designer-next > span,
#portal .a2g-designer-section-head > div > span,
#portal .a2g-designer-empty > span {
  color: #f0c168;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2g-designer-head h3,
#portal .a2g-designer-project-head h3,
#portal .a2g-designer-next h3,
#portal .a2g-designer-section-head h3,
#portal .a2g-designer-empty h3 {
  margin: 5px 0;
  color: #ffffff;
  letter-spacing: 0;
}

#portal .a2g-designer-head p,
#portal .a2g-designer-project-head p,
#portal .a2g-designer-next p,
#portal .a2g-designer-empty p {
  margin: 0;
  color: #c9cdc8;
  line-height: 1.52;
  overflow-wrap: anywhere;
}

#portal .a2g-designer-primary,
#portal .a2g-designer-project-head > button,
#portal .a2g-designer-next > button,
#portal .a2g-designer-empty > button {
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid #f0c168;
  border-radius: 6px;
  background: #f0c168;
  color: #17130d;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}

#portal .a2g-designer-primary:hover,
#portal .a2g-designer-primary:focus-visible,
#portal .a2g-designer-project-head > button:hover,
#portal .a2g-designer-project-head > button:focus-visible,
#portal .a2g-designer-next > button:hover,
#portal .a2g-designer-next > button:focus-visible,
#portal .a2g-designer-empty > button:hover,
#portal .a2g-designer-empty > button:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
  outline: none;
}

#portal .a2g-designer-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2g-designer-metrics button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  min-height: 84px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2g-designer-metrics button:hover,
#portal .a2g-designer-metrics button:focus-visible,
#portal .a2g-designer-update-list button:hover,
#portal .a2g-designer-update-list button:focus-visible,
#portal .a2g-designer-shortcuts button:hover,
#portal .a2g-designer-shortcuts button:focus-visible {
  border-color: rgba(240, 193, 104, 0.66);
  background: #171816;
  outline: none;
}

#portal .a2g-designer-metrics strong {
  grid-row: 1 / span 2;
  color: #f0c168;
  font-size: 29px;
  line-height: 1;
}

#portal .a2g-designer-metrics span {
  overflow-wrap: anywhere;
  font-weight: 780;
}

#portal .a2g-designer-metrics small {
  color: #aeb4ae;
}

#portal .a2g-designer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  min-width: 0;
}

#portal .a2g-designer-project,
#portal .a2g-designer-updates,
#portal .a2g-designer-empty {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #0e1010;
}

#portal .a2g-designer-project-head,
#portal .a2g-designer-section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

#portal .a2g-designer-project-head > button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: rgba(240, 193, 104, 0.44);
  background: transparent;
  color: #f0c168;
}

#portal .a2g-designer-status {
  display: inline-flex;
  max-width: 100%;
  margin-right: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(240, 193, 104, 0.34);
  border-radius: 999px;
  background: rgba(240, 193, 104, 0.1);
  color: #f0c168;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

#portal .a2g-designer-project-head small,
#portal .a2g-designer-section-head > small {
  color: #aeb4ae;
  overflow-wrap: anywhere;
}

#portal .a2g-designer-next {
  margin: 20px 0;
  padding: 18px;
  border-left: 3px solid #f0c168;
  background: #161612;
}

#portal .a2g-designer-next > button {
  margin-top: 14px;
}

#portal .a2g-designer-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#portal .a2g-designer-facts article {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#portal .a2g-designer-facts span,
#portal .a2g-designer-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2g-designer-facts span {
  margin-bottom: 4px;
  color: #aeb4ae;
  font-size: 11px;
}

#portal .a2g-designer-facts strong {
  color: #ffffff;
  font-size: 14px;
}

#portal .a2g-designer-section-head {
  align-items: center;
  margin-bottom: 12px;
}

#portal .a2g-designer-section-head h3 {
  font-size: 17px;
}

#portal .a2g-designer-update-list {
  display: grid;
  gap: 7px;
}

#portal .a2g-designer-update-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2g-designer-update-list strong,
#portal .a2g-designer-update-list small {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2g-designer-update-list small,
#portal .a2g-designer-update-list time,
#portal .a2g-designer-update-list > p {
  color: #aeb4ae;
  font-style: normal;
}

#portal .a2g-designer-update-list time {
  font-size: 11px;
  white-space: nowrap;
}

#portal .a2g-designer-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2g-designer-shortcuts button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2g-designer-shortcuts strong,
#portal .a2g-designer-shortcuts span {
  overflow-wrap: anywhere;
}

#portal .a2g-designer-shortcuts span {
  color: #bfc4bf;
  font-size: 12px;
  line-height: 1.42;
}

@media (max-width: 1040px) {
  #portal .a2g-designer-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2g-designer-facts,
  #portal .a2g-designer-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #portal .a2g-designer-head,
  #portal .a2g-designer-project-head,
  #portal .a2g-designer-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2g-designer-head,
  #portal .a2g-designer-project,
  #portal .a2g-designer-updates,
  #portal .a2g-designer-empty {
    padding: 16px;
  }

  #portal .a2g-designer-head > button,
  #portal .a2g-designer-project-head > button,
  #portal .a2g-designer-next > button,
  #portal .a2g-designer-empty > button {
    width: 100%;
  }

  #portal .a2g-designer-metrics,
  #portal .a2g-designer-facts,
  #portal .a2g-designer-shortcuts {
    grid-template-columns: 1fr;
  }

  #portal .a2g-designer-update-list button {
    grid-template-columns: 1fr;
  }

  #portal .a2g-designer-update-list time {
    white-space: normal;
  }
}

/* Stage A2H: concise components start view. Staging-only and URL-gated. */
#portal .a2h-components-start {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f5f5f1;
}

#portal .a2h-components-start button {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

#portal .a2h-components-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 22px;
  border: 1px solid #41413d;
  border-radius: 8px;
  background: #151513;
}

#portal .a2h-components-head > div,
#portal .a2h-components-record-head > div,
#portal .a2h-components-section-head > div,
#portal .a2h-components-next,
#portal .a2h-components-update-list span {
  min-width: 0;
}

#portal .a2h-components-head > div > span,
#portal .a2h-components-next > span,
#portal .a2h-components-section-head > div > span,
#portal .a2h-components-empty > span {
  display: block;
  margin-bottom: 7px;
  color: #c9aa68;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

#portal .a2h-components-head h3,
#portal .a2h-components-record-head h3,
#portal .a2h-components-next h3,
#portal .a2h-components-section-head h3,
#portal .a2h-components-empty h3 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#portal .a2h-components-head p,
#portal .a2h-components-record-head p,
#portal .a2h-components-next p,
#portal .a2h-components-empty p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #c9c9c2;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#portal .a2h-components-primary,
#portal .a2h-components-record-head > button,
#portal .a2h-components-next > button,
#portal .a2h-components-empty > button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c9aa68;
  border-radius: 6px;
  background: #c9aa68;
  color: #11110f;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  cursor: pointer;
}

#portal .a2h-components-primary:hover,
#portal .a2h-components-primary:focus-visible,
#portal .a2h-components-record-head > button:hover,
#portal .a2h-components-record-head > button:focus-visible,
#portal .a2h-components-next > button:hover,
#portal .a2h-components-next > button:focus-visible,
#portal .a2h-components-empty > button:hover,
#portal .a2h-components-empty > button:focus-visible {
  background: #e2c885;
  border-color: #e2c885;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

#portal .a2h-components-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

#portal .a2h-components-metrics button {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #3b3b37;
  border-radius: 7px;
  background: #1a1a18;
  color: #f5f5f1;
  text-align: left;
  cursor: pointer;
}

#portal .a2h-components-metrics button:hover,
#portal .a2h-components-metrics button:focus-visible,
#portal .a2h-components-update-list button:hover,
#portal .a2h-components-update-list button:focus-visible,
#portal .a2h-components-shortcuts button:hover,
#portal .a2h-components-shortcuts button:focus-visible {
  border-color: #c9aa68;
  background: #23231f;
  outline: none;
}

#portal .a2h-components-metrics strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

#portal .a2h-components-metrics span {
  color: #f5f5f1;
  font-size: 13px;
  font-weight: 750;
}

#portal .a2h-components-metrics small {
  color: #a9a9a2;
  font-size: 11px;
}

#portal .a2h-components-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 16px;
  min-width: 0;
}

#portal .a2h-components-record,
#portal .a2h-components-updates,
#portal .a2h-components-empty {
  min-width: 0;
  padding: 20px;
  border: 1px solid #3b3b37;
  border-radius: 8px;
  background: #181816;
}

#portal .a2h-components-record-head,
#portal .a2h-components-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

#portal .a2h-components-record-head > button {
  min-height: 36px;
  padding: 0 12px;
}

#portal .a2h-components-status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  margin-bottom: 8px;
  padding: 4px 9px;
  border: 1px solid #5f665e;
  border-radius: 999px;
  background: #253027;
  color: #d9ebdc;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

#portal .a2h-components-record-head small,
#portal .a2h-components-section-head > small {
  color: #a9a9a2;
  font-size: 11px;
}

#portal .a2h-components-next {
  margin-top: 18px;
  padding: 16px;
  border-left: 3px solid #c9aa68;
  background: #20201d;
}

#portal .a2h-components-next > button {
  margin-top: 14px;
}

#portal .a2h-components-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

#portal .a2h-components-facts article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #343430;
  background: #121210;
}

#portal .a2h-components-facts span,
#portal .a2h-components-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2h-components-facts span {
  color: #999991;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

#portal .a2h-components-facts strong {
  margin-top: 5px;
  color: #f5f5f1;
  font-size: 12px;
  line-height: 1.4;
}

#portal .a2h-components-section-head {
  align-items: center;
}

#portal .a2h-components-section-head h3 {
  font-size: 16px;
}

#portal .a2h-components-update-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

#portal .a2h-components-update-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 10px 12px;
  border: 1px solid #343430;
  background: #121210;
  color: #f5f5f1;
  text-align: left;
  cursor: pointer;
}

#portal .a2h-components-update-list strong,
#portal .a2h-components-update-list small {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2h-components-update-list small,
#portal .a2h-components-update-list time,
#portal .a2h-components-update-list > p {
  color: #a9a9a2;
  font-size: 11px;
}

#portal .a2h-components-update-list time {
  white-space: nowrap;
}

#portal .a2h-components-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

#portal .a2h-components-shortcuts button {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid #3b3b37;
  border-radius: 7px;
  background: #181816;
  color: #f5f5f1;
  text-align: left;
  cursor: pointer;
}

#portal .a2h-components-shortcuts strong,
#portal .a2h-components-shortcuts span {
  overflow-wrap: anywhere;
}

#portal .a2h-components-shortcuts span {
  color: #aaa9a1;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  #portal .a2h-components-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2h-components-facts,
  #portal .a2h-components-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #portal .a2h-components-head,
  #portal .a2h-components-record-head,
  #portal .a2h-components-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2h-components-head,
  #portal .a2h-components-record,
  #portal .a2h-components-updates,
  #portal .a2h-components-empty {
    padding: 16px;
  }

  #portal .a2h-components-head > button,
  #portal .a2h-components-record-head > button,
  #portal .a2h-components-next > button,
  #portal .a2h-components-empty > button {
    width: 100%;
  }

  #portal .a2h-components-metrics,
  #portal .a2h-components-facts,
  #portal .a2h-components-shortcuts {
    grid-template-columns: 1fr;
  }

  #portal .a2h-components-update-list button {
    grid-template-columns: 1fr;
  }

  #portal .a2h-components-update-list time {
    white-space: normal;
  }
}

/* Stage A2I: concise distributor start view. Staging-only and URL-gated. */
#portal .a2i-distributor-start {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f5f5f1;
}

#portal .a2i-distributor-start button {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

#portal .a2i-distributor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 22px;
  border: 1px solid #41413d;
  border-radius: 8px;
  background: #151513;
}

#portal .a2i-distributor-head > div,
#portal .a2i-distributor-case-head > div,
#portal .a2i-distributor-section-head > div,
#portal .a2i-distributor-next,
#portal .a2i-distributor-update-list span {
  min-width: 0;
}

#portal .a2i-distributor-head > div > span,
#portal .a2i-distributor-next > span,
#portal .a2i-distributor-section-head > div > span,
#portal .a2i-distributor-empty > span {
  display: block;
  margin-bottom: 7px;
  color: #c9aa68;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

#portal .a2i-distributor-head h3,
#portal .a2i-distributor-case-head h3,
#portal .a2i-distributor-next h3,
#portal .a2i-distributor-section-head h3,
#portal .a2i-distributor-empty h3 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#portal .a2i-distributor-head p,
#portal .a2i-distributor-case-head p,
#portal .a2i-distributor-next p,
#portal .a2i-distributor-empty p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #c9c9c2;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#portal .a2i-distributor-primary,
#portal .a2i-distributor-case-head > button,
#portal .a2i-distributor-next > button,
#portal .a2i-distributor-empty > button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c9aa68;
  border-radius: 6px;
  background: #c9aa68;
  color: #11110f;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  cursor: pointer;
}

#portal .a2i-distributor-primary:hover,
#portal .a2i-distributor-primary:focus-visible,
#portal .a2i-distributor-case-head > button:hover,
#portal .a2i-distributor-case-head > button:focus-visible,
#portal .a2i-distributor-next > button:hover,
#portal .a2i-distributor-next > button:focus-visible,
#portal .a2i-distributor-empty > button:hover,
#portal .a2i-distributor-empty > button:focus-visible {
  border-color: #e2c885;
  background: #e2c885;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

#portal .a2i-distributor-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

#portal .a2i-distributor-metrics button {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #3b3b37;
  border-radius: 7px;
  background: #1a1a18;
  color: #f5f5f1;
  text-align: left;
  cursor: pointer;
}

#portal .a2i-distributor-metrics button:hover,
#portal .a2i-distributor-metrics button:focus-visible,
#portal .a2i-distributor-update-list button:hover,
#portal .a2i-distributor-update-list button:focus-visible,
#portal .a2i-distributor-shortcuts button:hover,
#portal .a2i-distributor-shortcuts button:focus-visible {
  border-color: #c9aa68;
  background: #23231f;
  outline: none;
}

#portal .a2i-distributor-metrics strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

#portal .a2i-distributor-metrics span {
  color: #f5f5f1;
  font-size: 13px;
  font-weight: 750;
}

#portal .a2i-distributor-metrics small {
  color: #a9a9a2;
  font-size: 11px;
}

#portal .a2i-distributor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 16px;
  min-width: 0;
}

#portal .a2i-distributor-case,
#portal .a2i-distributor-updates,
#portal .a2i-distributor-empty {
  min-width: 0;
  padding: 20px;
  border: 1px solid #3b3b37;
  border-radius: 8px;
  background: #181816;
}

#portal .a2i-distributor-case-head,
#portal .a2i-distributor-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

#portal .a2i-distributor-case-head > button {
  min-height: 36px;
  padding: 0 12px;
}

#portal .a2i-distributor-status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  margin-bottom: 8px;
  padding: 4px 9px;
  border: 1px solid #5f665e;
  border-radius: 999px;
  background: #253027;
  color: #d9ebdc;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

#portal .a2i-distributor-case-head small,
#portal .a2i-distributor-section-head > small {
  color: #a9a9a2;
  font-size: 11px;
}

#portal .a2i-distributor-next {
  margin-top: 18px;
  padding: 16px;
  border-left: 3px solid #c9aa68;
  background: #20201d;
}

#portal .a2i-distributor-next > button {
  margin-top: 14px;
}

#portal .a2i-distributor-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

#portal .a2i-distributor-facts article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #343430;
  background: #121210;
}

#portal .a2i-distributor-facts span,
#portal .a2i-distributor-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2i-distributor-facts span {
  color: #999991;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

#portal .a2i-distributor-facts strong {
  margin-top: 5px;
  color: #f5f5f1;
  font-size: 12px;
  line-height: 1.4;
}

#portal .a2i-distributor-section-head {
  align-items: center;
}

#portal .a2i-distributor-section-head h3 {
  font-size: 16px;
}

#portal .a2i-distributor-update-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

#portal .a2i-distributor-update-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 10px 12px;
  border: 1px solid #343430;
  background: #121210;
  color: #f5f5f1;
  text-align: left;
  cursor: pointer;
}

#portal .a2i-distributor-update-list strong,
#portal .a2i-distributor-update-list small {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2i-distributor-update-list small,
#portal .a2i-distributor-update-list time,
#portal .a2i-distributor-update-list > p {
  color: #a9a9a2;
  font-size: 11px;
}

#portal .a2i-distributor-update-list time {
  white-space: nowrap;
}

#portal .a2i-distributor-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

#portal .a2i-distributor-shortcuts button {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid #3b3b37;
  border-radius: 7px;
  background: #181816;
  color: #f5f5f1;
  text-align: left;
  cursor: pointer;
}

#portal .a2i-distributor-shortcuts strong,
#portal .a2i-distributor-shortcuts span {
  overflow-wrap: anywhere;
}

#portal .a2i-distributor-shortcuts span {
  color: #aaa9a1;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  #portal .a2i-distributor-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2i-distributor-facts,
  #portal .a2i-distributor-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #portal .a2i-distributor-head,
  #portal .a2i-distributor-case-head,
  #portal .a2i-distributor-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2i-distributor-head,
  #portal .a2i-distributor-case,
  #portal .a2i-distributor-updates,
  #portal .a2i-distributor-empty {
    padding: 16px;
  }

  #portal .a2i-distributor-head > button,
  #portal .a2i-distributor-case-head > button,
  #portal .a2i-distributor-next > button,
  #portal .a2i-distributor-empty > button {
    width: 100%;
  }

  #portal .a2i-distributor-metrics,
  #portal .a2i-distributor-facts,
  #portal .a2i-distributor-shortcuts {
    grid-template-columns: 1fr;
  }

  #portal .a2i-distributor-update-list button {
    grid-template-columns: 1fr;
  }

  #portal .a2i-distributor-update-list time {
    white-space: normal;
  }
}

/* Stage A2C: concise admin communications hub. Staging-only and URL-gated. */
#portal .a2c-admin-messages {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f5f5f1;
}

#portal .a2c-admin-messages button {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

#portal .a2c-messages-head,
#portal .a2c-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

#portal .a2c-messages-head > div,
#portal .a2c-section-head > div {
  min-width: 0;
}

#portal .a2c-messages-head span,
#portal .a2c-section-head span {
  color: #d8b467;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2c-messages-head h3,
#portal .a2c-section-head h3 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
}

#portal .a2c-messages-head p {
  max-width: 680px;
  margin: 7px 0 0;
  color: #c4c8c3;
  line-height: 1.48;
}

#portal .a2c-messages-head > button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #d8b467;
  border-radius: 6px;
  background: #d8b467;
  color: #090a0a;
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
}

#portal .a2c-messages-head > button:hover,
#portal .a2c-messages-head > button:focus-visible {
  border-color: #f2d694;
  background: #f2d694;
  outline: none;
}

#portal .a2c-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

#portal .a2c-channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: start;
  min-height: 126px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: #111414;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a2c-channel:hover,
#portal .a2c-channel:focus-visible {
  border-color: rgba(216, 180, 103, 0.72);
  background: #171918;
  outline: none;
}

#portal .a2c-channel > span {
  color: #f4f4ef;
  font-size: 15px;
  font-weight: 800;
}

#portal .a2c-channel > strong {
  color: #d8b467;
  font-size: 25px;
  line-height: 1;
}

#portal .a2c-channel > small {
  grid-column: 1 / -1;
  color: #bfc4bf;
  line-height: 1.38;
}

#portal .a2c-channel > b {
  grid-column: 1 / -1;
  align-self: end;
  color: #e8c980;
  font-size: 12px;
}

#portal .a2c-recent {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

#portal .a2c-section-head > small {
  color: #9fa59f;
}

#portal .a2c-message-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#portal .a2c-message-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: #0d0f0f;
  color: #f7f7f3;
  text-align: left;
  cursor: pointer;
}

#portal .a2c-message-row:hover,
#portal .a2c-message-row:focus-visible {
  border-color: rgba(216, 180, 103, 0.62);
  background: #151716;
  outline: none;
}

#portal .a2c-message-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #d6dad5;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

#portal .a2c-message-kind.action {
  border-color: rgba(216, 180, 103, 0.62);
  color: #f2d694;
}

#portal .a2c-message-kind.sent {
  border-color: rgba(128, 171, 151, 0.46);
  color: #b9d8c9;
}

#portal .a2c-message-kind.chat,
#portal .a2c-message-kind.group {
  border-color: rgba(171, 177, 184, 0.38);
  color: #d5d9dc;
}

#portal .a2c-message-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#portal .a2c-message-copy strong,
#portal .a2c-message-copy small,
#portal .a2c-message-copy em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#portal .a2c-message-copy strong {
  color: #ffffff;
  font-size: 14px;
}

#portal .a2c-message-copy small {
  color: #d2b66f;
  font-weight: 700;
}

#portal .a2c-message-copy em {
  color: #aeb4ae;
  font-size: 12px;
  font-style: normal;
}

#portal .a2c-message-row time {
  color: #aeb4ae;
  font-size: 11px;
  white-space: nowrap;
}

#portal .a2c-empty {
  padding: 18px;
  border: 1px dashed rgba(216, 180, 103, 0.35);
  border-radius: 6px;
  background: #0d0f0f;
}

#portal .a2c-empty strong {
  color: #ffffff;
}

#portal .a2c-empty p {
  margin: 5px 0 0;
  color: #bfc4bf;
  line-height: 1.45;
}

@media (max-width: 1040px) {
  #portal .a2c-channel-grid {
    grid-template-columns: 1fr;
  }

  #portal .a2c-channel {
    min-height: 104px;
  }
}

@media (max-width: 680px) {
  #portal .a2c-messages-head,
  #portal .a2c-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  #portal .a2c-messages-head > button {
    width: 100%;
  }

  #portal .a2c-message-row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 9px;
  }

  #portal .a2c-message-row time {
    grid-column: 2;
    white-space: normal;
  }

  #portal .a2c-message-copy strong,
  #portal .a2c-message-copy small,
  #portal .a2c-message-copy em {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Stage A2D: grouped admin tools. Staging-only and URL-gated. */
#portal .a2d-admin-more {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 1040px;
  color: #f5f5f1;
}

#portal .a2d-admin-more button {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

#portal .a2d-more-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 18px;
  border-bottom: 1px solid rgba(216, 180, 103, 0.34);
}

#portal .a2d-more-head > div,
#portal .a2d-more-group header,
#portal .a2d-advanced-access > div {
  min-width: 0;
}

#portal .a2d-more-head span,
#portal .a2d-more-group header span,
#portal .a2d-advanced-access > div > span {
  display: block;
  color: #d8b467;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

#portal .a2d-more-head h3 {
  margin: 5px 0 7px;
  color: #ffffff;
  font-size: 26px;
  line-height: 1.12;
}

#portal .a2d-more-head p,
#portal .a2d-more-group header p,
#portal .a2d-advanced-access p {
  margin: 0;
  color: #bfc4bf;
  line-height: 1.48;
}

#portal .a2d-more-head > small {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(216, 180, 103, 0.34);
  border-radius: 5px;
  color: #e4cb91;
  background: #111210;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

#portal .a2d-more-groups,
#portal .a2d-more-list {
  display: grid;
  min-width: 0;
}

#portal .a2d-more-groups {
  gap: 4px;
}

#portal .a2d-more-group {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

#portal .a2d-more-group header {
  padding-top: 11px;
}

#portal .a2d-more-group header p {
  margin-top: 7px;
  font-size: 12px;
}

#portal .a2d-more-list {
  gap: 7px;
}

#portal .a2d-more-list > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f7f3eb;
  background: #111313;
  text-align: left;
  cursor: pointer;
}

#portal .a2d-more-list > button:hover,
#portal .a2d-more-list > button:focus-visible {
  border-color: rgba(216, 180, 103, 0.58);
  background: #171711;
  outline: none;
}

#portal .a2d-more-list > button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#portal .a2d-more-list strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.3;
}

#portal .a2d-more-list small {
  color: #b8bdb8;
  font-size: 12px;
  line-height: 1.38;
  white-space: normal;
  overflow-wrap: anywhere;
}

#portal .a2d-more-list b {
  color: #d8b467;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

#portal .a2d-advanced-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(216, 180, 103, 0.28);
  border-radius: 6px;
  background: #0d0f0f;
}

#portal .a2d-advanced-access strong {
  display: block;
  margin: 4px 0;
  color: #ffffff;
  line-height: 1.3;
}

#portal .a2d-advanced-access p {
  font-size: 12px;
}

#portal .a2d-advanced-access > button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(216, 180, 103, 0.45);
  border-radius: 5px;
  color: #f4d48f;
  background: #171711;
  font-weight: 800;
  cursor: pointer;
}

#portal .a2d-advanced-access > button:hover,
#portal .a2d-advanced-access > button:focus-visible {
  border-color: #d8b467;
  outline: none;
}

@media (max-width: 820px) {
  #portal .a2d-more-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #portal .a2d-more-group header {
    padding-top: 0;
  }
}

@media (max-width: 680px) {
  #portal .a2d-admin-more {
    gap: 12px;
  }

  #portal .a2d-more-head,
  #portal .a2d-advanced-access {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2d-more-head > small {
    align-self: flex-start;
    white-space: normal;
  }

  #portal .a2d-more-list > button {
    gap: 8px;
    min-height: 68px;
  }

  #portal .a2d-advanced-access > button {
    width: 100%;
  }
}

/* Stage A2B: concise operator work queue. Staging-only and URL-gated. */
#portal .a2b-admin-work {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f5f5f1;
}

#portal .a2b-admin-work button {
  font: inherit;
  letter-spacing: 0;
}

#portal .a2b-work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

#portal .a2b-work-head > div {
  min-width: 0;
}

#portal .a2b-work-head > div > span {
  display: block;
  margin-bottom: 5px;
  color: #e8bd6b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2b-work-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 27px;
  line-height: 1.15;
}

#portal .a2b-work-head p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #b9bdb9;
  line-height: 1.55;
}

#portal .a2b-work-head > button,
#portal .a2b-case-helper {
  flex: 0 0 auto;
  min-height: 40px;
  max-width: 250px;
  padding: 9px 13px;
  border: 1px solid rgba(230, 188, 101, 0.38);
  border-radius: 6px;
  background: #171814;
  color: #efc975;
  font-weight: 780;
  cursor: pointer;
  white-space: normal;
}

#portal .a2b-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 560px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #090b0a;
}

#portal .a2b-filters button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #b9bdb9;
  cursor: pointer;
}

#portal .a2b-filters button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#portal .a2b-filters button b {
  color: #e8bd6b;
  font-size: 12px;
}

#portal .a2b-filters button.active,
#portal .a2b-filters button:hover,
#portal .a2b-filters button:focus-visible {
  background: #1a1c17;
  color: #ffffff;
  outline: 1px solid rgba(230, 188, 101, 0.42);
}

#portal .a2b-work-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.86fr) minmax(0, 1.5fr);
  gap: 16px;
  min-width: 0;
  align-items: start;
}

#portal .a2b-case-list,
#portal .a2b-case-workspace,
#portal .a2b-empty {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #101312;
}

#portal .a2b-case-list {
  display: grid;
  overflow: hidden;
}

#portal .a2b-list-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #aeb2ae;
}

#portal .a2b-list-summary strong {
  color: #f0c777;
  font-size: 20px;
}

#portal .a2b-case-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 72px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #f4f4ef;
  text-align: left;
  cursor: pointer;
}

#portal .a2b-case-row:last-of-type {
  border-bottom: 0;
}

#portal .a2b-case-row:hover,
#portal .a2b-case-row:focus-visible,
#portal .a2b-case-row.active {
  background: #181a16;
  outline: none;
}

#portal .a2b-case-row.active {
  box-shadow: inset 3px 0 0 #d6a84d;
}

#portal .a2b-case-code {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(230, 188, 101, 0.28);
  border-radius: 6px;
  background: #0b0d0c;
  color: #e9c475;
  font-size: 10px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

#portal .a2b-case-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#portal .a2b-case-copy strong,
#portal .a2b-case-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

#portal .a2b-case-copy small {
  color: #aeb2ae;
  line-height: 1.35;
}

#portal .a2b-case-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  color: #d8ddd8;
  font-size: 10px;
  font-weight: 850;
  white-space: normal;
  text-align: center;
}

#portal .a2b-case-state.action {
  border-color: rgba(230, 188, 101, 0.48);
  background: #242017;
  color: #f2cc7e;
}

#portal .a2b-case-state.progress {
  border-color: rgba(129, 169, 151, 0.32);
  background: #14211b;
  color: #b8d5c7;
}

#portal .a2b-case-state.done {
  background: #171918;
  color: #a9ada9;
}

#portal .a2b-list-note {
  margin: 0;
  padding: 12px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #969d98;
  font-size: 12px;
  line-height: 1.45;
}

#portal .a2b-case-workspace {
  display: grid;
  gap: 16px;
  padding: 20px;
}

#portal .a2b-case-heading {
  display: grid;
  justify-items: start;
  min-width: 0;
}

#portal .a2b-case-heading > small {
  margin-top: 14px;
  color: #e8bd6b;
  font-weight: 800;
}

#portal .a2b-case-heading h3 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 22px;
  overflow-wrap: anywhere;
}

#portal .a2b-case-heading p {
  margin: 6px 0 0;
  color: #aeb2ae;
  overflow-wrap: anywhere;
}

#portal .a2b-next-action {
  display: grid;
  justify-items: start;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(230, 188, 101, 0.42);
  border-left: 4px solid #d6a84d;
  border-radius: 7px;
  background: #151712;
}

#portal .a2b-next-action > span {
  color: #e8bd6b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

#portal .a2b-next-action h3 {
  margin: 6px 0 0;
  color: #ffffff;
  font-size: 19px;
  overflow-wrap: anywhere;
}

#portal .a2b-next-action p {
  margin: 7px 0 15px;
  color: #bdc1bd;
  line-height: 1.5;
}

#portal .a2b-next-action button {
  min-height: 42px;
  max-width: 260px;
  padding: 9px 14px;
  border: 1px solid #d6a84d;
  border-radius: 6px;
  background: #d6a84d;
  color: #090a09;
  font-weight: 850;
  cursor: pointer;
  white-space: normal;
}

#portal .a2b-case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  overflow: hidden;
}

#portal .a2b-case-facts article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#portal .a2b-case-facts article:last-child {
  border-right: 0;
}

#portal .a2b-case-facts span {
  color: #969d98;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2b-case-facts strong {
  color: #f2f3ee;
  overflow-wrap: anywhere;
}

#portal .a2b-empty {
  padding: 24px;
}

#portal .a2b-empty h3 {
  margin: 0;
  color: #ffffff;
}

#portal .a2b-empty p {
  margin: 7px 0 0;
  color: #aeb2ae;
}

@media (max-width: 1040px) {
  #portal .a2b-work-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2b-case-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #portal .a2b-case-facts article:nth-child(2) {
    border-right: 0;
  }

  #portal .a2b-case-facts article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 680px) {
  #portal .a2b-admin-work {
    gap: 12px;
  }

  #portal .a2b-work-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .a2b-work-head h3 {
    font-size: 23px;
  }

  #portal .a2b-work-head > button,
  #portal .a2b-case-helper,
  #portal .a2b-next-action button {
    width: 100%;
    max-width: none;
  }

  #portal .a2b-filters {
    max-width: none;
  }

  #portal .a2b-filters button {
    align-content: center;
    display: grid;
    justify-items: center;
    padding: 7px;
    text-align: center;
  }

  #portal .a2b-case-row {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 10px;
  }

  #portal .a2b-case-code {
    width: 38px;
    height: 38px;
  }

  #portal .a2b-case-row .a2b-case-state {
    grid-column: 2;
    justify-self: start;
  }

  #portal .a2b-case-workspace,
  #portal .a2b-next-action {
    padding: 15px;
  }

  #portal .a2b-case-facts {
    grid-template-columns: 1fr;
  }

  #portal .a2b-case-facts article,
  #portal .a2b-case-facts article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #portal .a2b-case-facts article:last-child {
    border-bottom: 0;
  }
}

/* CEIG deployment readiness extensions */
.inquiry-wizard,
.decision-grid,
.ai-control-list,
.case-timeline,
.security-grid,
.calendar-ai-grid,
.factory-action-buttons {
  display: grid;
  gap: 10px;
}

.inquiry-wizard {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0 18px;
}

.inquiry-wizard article,
.decision-card,
.ai-control-list article,
.case-timeline article,
.security-grid article,
.calendar-ai-grid article,
.factory-quick-actions-panel,
.sector-template-panel,
.offer-matrix-panel,
.ai-control-panel,
.case-timeline-panel,
.security-readiness-panel,
.smart-calendar-panel {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 8px;
}

.inquiry-wizard article {
  padding: 11px;
}

.inquiry-wizard strong,
.case-timeline span {
  color: var(--gold);
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.inquiry-wizard span,
.decision-card strong,
.security-grid strong {
  color: var(--text);
  display: block;
  font-weight: 700;
}

.inquiry-wizard p,
.decision-card p,
.ai-control-list p,
.case-timeline p,
.security-grid p,
.calendar-ai-grid p,
.sector-template-panel p,
.factory-quick-actions-panel p {
  color: var(--muted);
  margin: 5px 0 0;
}

.decision-center,
.offer-matrix-panel,
.sector-template-panel,
.ai-control-panel,
.case-timeline-panel,
.security-readiness-panel,
.smart-calendar-panel,
.factory-quick-actions-panel {
  margin: 18px 0;
  padding: 18px;
}

.decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.decision-card {
  cursor: pointer;
  padding: 16px;
  text-align: left;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.decision-card:hover {
  border-color: rgba(203, 166, 92, .62);
  background: rgba(203, 166, 92, .08);
  transform: translateY(-1px);
}

.decision-card.warning,
.ai-control-list article.warning {
  border-color: rgba(203, 166, 92, .48);
}

.decision-card.danger,
.ai-control-list article.danger {
  border-color: rgba(230, 83, 83, .52);
}

.decision-card em {
  color: var(--gold);
  display: block;
  font-style: normal;
  margin-top: 10px;
}

.ai-control-list article {
  align-items: flex-start;
  display: grid;
  grid-template-columns: auto 1fr;
  padding: 12px;
}

.case-timeline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-timeline article {
  padding: 13px;
}

.case-timeline small {
  color: var(--muted);
}

.offer-matrix-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.offer-matrix-table .matrix-head,
.offer-matrix-table article {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(90px, 1fr));
  gap: 10px;
  align-items: center;
}

.offer-matrix-table .matrix-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.offer-matrix-table article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
}

.offer-matrix-table small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.offer-matrix-table .empty-row {
  grid-template-columns: 1fr;
}

.offer-matrix-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.offer-matrix-summary article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .035);
}

.offer-matrix-summary strong,
.factory-strategic-grid strong,
.factory-strategic-results strong {
  color: var(--gold-2);
  display: block;
}

.offer-matrix-summary small {
  color: var(--muted);
}

.sector-template-panel {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1fr;
  gap: 18px;
}

.sector-template-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.sector-template-panel li {
  list-style: none;
  padding-left: 18px;
  position: relative;
}

.sector-template-panel li::before {
  background: var(--gold);
  border-radius: 50%;
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  top: .65em;
  width: 6px;
}

.security-grid,
.calendar-ai-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.security-grid article,
.calendar-ai-grid article {
  padding: 14px;
}

.factory-quick-actions-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
}

.factory-action-buttons {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.factory-action-buttons .small-button {
  width: 100%;
  min-height: 46px;
}

@media (max-width: 1180px) {
  .inquiry-package-generator,
  .package-generator-form,
  .document-workbench .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .distributor-admin-workbench .workbench-grid,
  .distributor-admin-workbench .form-grid,
  .distributor-admin-workbench .order-meta-grid {
    grid-template-columns: 1fr;
  }
  .distributor-admin-workbench input,
  .distributor-admin-workbench select,
  .distributor-admin-workbench textarea {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .package-generator-stats {
    display: grid;
    grid-template-columns: 1fr;
  }
  .source-file-card {
    grid-template-columns: 1fr;
  }
  .source-file-card .document-actions {
    justify-content: stretch;
  }
}

@media (max-width: 1180px) {
  .inquiry-package-generator {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .package-generator-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 1180px) {
  .inquiry-wizard,
  .decision-grid,
  .case-timeline,
  .security-grid,
  .calendar-ai-grid,
  .sector-template-panel,
  .factory-quick-actions-panel {
    grid-template-columns: 1fr;
  }

  .offer-matrix-table { overflow-x: visible; }
  .offer-matrix-table .matrix-head { display: none; }
  .offer-matrix-table .matrix-head,
  .offer-matrix-table article {
    min-width: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .factory-action-buttons {
    grid-template-columns: 1fr;
  }
}

/* CEIG final operational suite */
.notification-digest,
.sharing-center,
.package-builder,
.case360-shell {
  width: 100%;
}

.notification-digest {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(17, 28, 27, 0.92), rgba(5, 6, 6, 0.88));
}

.notification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.notification-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.notification-card,
.sharing-card,
.package-preview,
.case360-hero,
.case-checklist-panel {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.notification-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  padding: 18px;
}

.notification-card.critical { border-color: rgba(157, 77, 67, 0.72); }
.notification-card.warning { border-color: rgba(216, 155, 47, 0.55); }
.notification-card.ok { border-color: rgba(76, 138, 98, 0.48); }
.notification-card p,
.sharing-card p,
.package-preview p,
.case360-hero p { color: var(--muted); }

.stage3-command-center {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11,18,18,.96), rgba(4,5,5,.92)),
    radial-gradient(circle at 100% 0%, rgba(216,155,47,.14), transparent 28%);
}
.stage3-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 14px;
  align-items: stretch;
}
.stage3-head h3 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
}
.stage3-head p,
.stage3-action p,
.stage3-metrics p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.stage3-head article {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.stage3-head article strong {
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.stage3-head article span {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}
.stage3-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage3-metrics article {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.stage3-metrics strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}
.stage3-metrics span {
  display: block;
  margin: 4px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.stage3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.stage3-action {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 198px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.stage3-action.critical { border-color: rgba(157,77,67,.7); }
.stage3-action.warning { border-color: rgba(216,155,47,.48); }
.stage3-action.ok { border-color: rgba(76,138,98,.42); }
.stage3-action h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  text-transform: uppercase;
}
.stage3-action .mini-actions {
  align-self: end;
}

.stage4-launch-center {
  display: grid;
  gap: 16px;
}
.stage4-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 14px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10,17,17,.96), rgba(2,3,3,.92)),
    radial-gradient(circle at 100% 0%, rgba(216,155,47,.16), transparent 30%);
}
.stage4-hero h3 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.02;
  text-transform: uppercase;
}
.stage4-hero p,
.stage4-metrics p,
.stage4-check p,
.stage4-risk-list p,
.stage4-playbook p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}
.stage4-hero article {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.stage4-hero article.ok { border-color: rgba(76,138,98,.55); }
.stage4-hero article.warning { border-color: rgba(216,155,47,.5); }
.stage4-hero article strong {
  color: var(--gold-2);
  font-size: clamp(34px, 5vw, 58px);
  line-height: .9;
}
.stage4-hero article span {
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
}
.stage4-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage4-metrics article,
.stage4-checklist,
.stage4-risk-panel,
.stage4-playbook article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.stage4-metrics article {
  padding: 14px;
}
.stage4-metrics strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}
.stage4-metrics span {
  display: block;
  margin: 5px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.stage4-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, .84fr);
  gap: 14px;
  align-items: start;
}
.stage4-checklist,
.stage4-risk-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}
.stage4-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.stage4-check.critical {
  border-color: rgba(216,155,47,.34);
}
.stage4-check.done {
  border-color: rgba(76,138,98,.5);
  background: rgba(76,138,98,.08);
}
.stage4-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}
.stage4-check strong {
  display: block;
  color: var(--text);
  text-transform: uppercase;
}
.stage4-check small,
.stage4-check em {
  display: block;
  margin: 3px 0 6px;
  color: var(--gold-2);
  font-style: normal;
  font-size: 12px;
}
.stage4-risk-list {
  display: grid;
  gap: 9px;
}
.stage4-risk-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.stage4-risk-list article.danger { border-color: rgba(157,77,67,.62); }
.stage4-risk-list article.warning { border-color: rgba(216,155,47,.45); }
.stage4-risk-list article.ok { border-color: rgba(76,138,98,.5); }
.stage4-risk-list strong {
  color: var(--text);
}
.stage4-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stage4-playbook {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage4-playbook article {
  padding: 14px;
}
.stage4-playbook span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
}
.stage4-playbook h4 {
  margin: 6px 0;
  color: var(--text);
  text-transform: uppercase;
}

.stage5-outreach-center {
  display: grid;
  gap: 16px;
}
.stage5-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid rgba(216,155,47,.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(8,14,14,.96), rgba(1,2,2,.94));
}
.stage5-hero h3 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.04;
  text-transform: uppercase;
}
.stage5-hero p,
.stage5-metrics p,
.stage5-list p,
.stage5-detail p,
.stage5-response-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}
.stage5-hero article {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.stage5-hero article strong {
  color: var(--gold-2);
  font-size: clamp(36px, 5vw, 58px);
  line-height: .9;
}
.stage5-hero article span,
.stage5-metrics span {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.stage5-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage5-metrics article,
.stage5-list,
.stage5-detail,
.stage5-detail-grid article,
.stage5-response-summary article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.stage5-metrics article {
  padding: 14px;
}
.stage5-metrics strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}
.stage5-grid {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}
.stage5-list,
.stage5-detail {
  display: grid;
  gap: 12px;
  padding: 18px;
  min-width: 0;
}
.stage5-outreach-card {
  width: 100%;
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  cursor: pointer;
}
.stage5-outreach-card.active {
  border-color: rgba(216,155,47,.58);
  background: rgba(216,155,47,.09);
}
.stage5-outreach-card.due {
  border-color: rgba(216,155,47,.45);
}
.stage5-outreach-card.answered {
  border-color: rgba(76,138,98,.5);
}
.stage5-outreach-card strong,
.stage5-detail h3,
.stage5-detail h4,
.stage5-response-summary h4 {
  margin: 0;
  color: var(--text);
}
.stage5-outreach-card small {
  color: var(--gold-2);
  font-weight: 700;
}
.stage5-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 12px;
}
.stage5-detail-grid article,
.stage5-response-summary article {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  min-width: 0;
}
.stage5-detail textarea,
.stage5-detail input,
.stage5-detail select {
  width: 100%;
}
.stage5-detail textarea[readonly] {
  min-height: 280px;
  resize: vertical;
  color: var(--text);
  background: rgba(0,0,0,.26);
}
.stage5-response-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr);
  gap: 12px;
}

.stage6-mail-center {
  display: grid;
  gap: 16px;
}
.stage6-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(8,14,14,.97), rgba(2,4,4,.94));
}
.stage6-hero h3 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.04;
  text-transform: uppercase;
}
.stage6-hero p,
.stage6-metrics p,
.stage6-list p,
.stage6-detail p,
.stage6-history p,
.stage6-log-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}
.stage6-hero article {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.stage6-hero article strong {
  color: var(--gold-2);
  font-size: clamp(36px, 5vw, 58px);
  line-height: .9;
}
.stage6-hero article span,
.stage6-metrics span {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.stage6-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage6-metrics article,
.stage6-list,
.stage6-detail,
.stage6-send-form,
.stage6-inbound-form,
.stage6-history,
.stage6-log-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.stage6-metrics article {
  padding: 14px;
}
.stage6-metrics strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}
.stage6-quick-rfq-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .9fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(82,174,116,.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(82,174,116,.075), rgba(0,0,0,.2));
}
.stage6-quick-rfq-panel h3 {
  margin: 7px 0 6px;
  color: var(--text);
}
.stage6-quick-rfq-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.stage6-quick-rfq-panel label {
  margin: 0;
}
.stage6-quick-rfq-panel select {
  width: 100%;
}
.stage6-bulk-panel {
  display: grid;
  gap: 12px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(216,155,47,.075), rgba(0,0,0,.18));
  min-width: 0;
}
.stage6-bulk-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.stage6-bulk-panel h3 {
  margin: 7px 0 6px;
  color: var(--text);
}
.stage6-bulk-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.stage6-bulk-stats,
.stage6-bulk-actions {
  display: grid;
  gap: 8px;
}
.stage6-bulk-stats {
  grid-template-columns: repeat(2, minmax(82px, 1fr));
}
.stage6-bulk-stats article {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.16);
}
.stage6-bulk-stats strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}
.stage6-bulk-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.stage6-bulk-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.stage6-bulk-schedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.stage6-bulk-schedule label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.stage6-bulk-schedule input {
  width: 100%;
  min-width: 0;
}
.stage6-bulk-actions .small-button {
  min-height: 42px;
  white-space: normal;
}
.stage6-bulk-review {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.14);
}
.stage6-bulk-review-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  min-width: 0;
}
.stage6-bulk-review-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.stage6-bulk-review-list strong,
.stage6-bulk-review-list small,
.stage6-bulk-review-list p {
  display: block;
  overflow-wrap: anywhere;
}
.stage6-bulk-review-list strong {
  color: var(--text);
}
.stage6-bulk-review-list small,
.stage6-bulk-review-list p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}
.stage6-grid {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  gap: 14px;
  align-items: start;
}
.stage6-list,
.stage6-detail,
.stage6-history {
  display: grid;
  gap: 12px;
  padding: 18px;
  min-width: 0;
}
.stage6-mail-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}
.stage6-mail-check {
  display: grid;
  place-items: start center;
  padding-top: 14px;
}
.stage6-mail-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold-2);
}
.stage6-mail-card {
  width: 100%;
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  cursor: pointer;
}
.stage6-mail-card.active {
  border-color: rgba(216,155,47,.58);
  background: rgba(216,155,47,.09);
}
.stage6-mail-card.answered {
  border-color: rgba(76,138,98,.5);
}
.stage6-mail-card.due {
  border-color: rgba(216,155,47,.45);
}
.stage6-mail-card strong,
.stage6-detail h3,
.stage6-history h3,
.stage6-log-card h4 {
  margin: 0;
  color: var(--text);
}
.stage6-mail-card small,
.stage6-log-card small,
.stage6-send-form small,
.stage6-inbound-form small {
  color: var(--gold-2);
  font-weight: 700;
}
.stage6-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.stage6-send-form,
.stage6-inbound-form {
  padding: 16px;
  min-width: 0;
}
.stage6-detail textarea,
.stage6-detail input,
.stage6-detail select {
  width: 100%;
}
.stage6-send-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}
.stage6-send-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.stage6-send-buttons .small-button,
.stage6-send-options > .small-button {
  min-height: 44px;
  width: 100%;
  white-space: normal;
}
.stage6-language-lock {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(179, 133, 38, 0.28);
  border-radius: 8px;
  background: rgba(179, 133, 38, 0.08);
}
.stage6-language-lock > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.stage6-language-lock > strong {
  color: var(--text);
  font-size: 15px;
}
.stage6-language-lock > small {
  color: var(--muted);
  line-height: 1.4;
}
.stage6-approval-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(179, 133, 38, 0.28);
  border-radius: 10px;
  background: rgba(179, 133, 38, 0.08);
  color: var(--text);
  line-height: 1.35;
}
.stage6-approval-check input {
  width: auto;
  margin-top: 3px;
}
.stage6-send-options > .small-button:not(:last-child) {
  justify-self: stretch;
}
.stage6-send-form > small,
.stage6-send-note {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.stage6-safe-preview,
.stage6-internal-note {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.stage6-safe-preview {
  border-color: rgba(180, 137, 61, 0.32);
  background: #fffaf0;
}
.stage6-internal-note {
  border-color: rgba(28, 35, 48, 0.16);
  background: #f7f8fa;
}
.stage6-safe-preview p,
.stage6-internal-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.stage6-diagnostics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.stage6-diagnostics-strip span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.stage6-diagnostics-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.stage6-diagnostics-strip strong {
  color: var(--text);
  overflow-wrap: anywhere;
}
.stage6-log-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.stage6-log-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  min-width: 0;
}
.stage6-log-card.inbound {
  border-color: rgba(76,138,98,.45);
}

.stage6-rfq-review {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(216,155,47,.08), rgba(255,255,255,.035));
}
.stage6-rfq-review-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.stage6-rfq-review h4 {
  margin: 6px 0;
  color: var(--text);
}
.stage6-rfq-review p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.stage6-rfq-review-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.stage6-rfq-review-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.16);
  text-align: center;
}
.stage6-rfq-review-stats strong {
  color: var(--gold-2);
  font-size: 20px;
  line-height: 1;
}
.stage6-rfq-review-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.stage6-rfq-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 12px;
  min-width: 0;
}
.stage6-rfq-pdf-preview,
.stage6-rfq-files-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.14);
}
.stage6-rfq-pdf-preview pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.stage6-inline-pdf {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(184, 145, 69, .4);
}
.stage6-inline-pdf > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.stage6-inline-pdf > div strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage6-inline-pdf iframe {
  width: 100%;
  height: min(68vh, 720px);
  min-height: 460px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  background: #fff;
}
.stage6-rfq-readiness-warning,
.stage6-rfq-readiness-ok {
  display: grid;
  grid-template-columns: minmax(160px, .42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(184, 145, 69, .5);
  border-radius: 6px;
  background: rgba(184, 145, 69, .09);
}
.stage6-rfq-readiness-warning strong { color: #f4c76d; }
.stage6-rfq-readiness-ok {
  border-color: rgba(102, 190, 145, .45);
  background: rgba(102, 190, 145, .08);
}
.stage6-rfq-readiness-ok strong { color: #8ed5b3; }
.stage6-rfq-readiness-warning span,
.stage6-rfq-readiness-ok span { color: var(--text); line-height: 1.45; }
.stage-c3-simple-flow article {
  grid-template-columns: minmax(110px, .3fr) minmax(0, 1fr);
  align-items: start;
}
.stage-c3-simple-flow article strong { color: var(--gold-2); }
.stage-c3-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 700px) {
  .stage6-inline-pdf iframe { min-height: 380px; height: 62vh; }
  .stage6-rfq-readiness-warning,
  .stage6-rfq-readiness-ok { grid-template-columns: 1fr; }
  .stage-c3-simple-flow article { grid-template-columns: 1fr; }
}
.stage6-rfq-doc-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.stage6-rfq-doc-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.stage6-rfq-doc-card.generated {
  border-color: rgba(216,155,47,.3);
}
.stage6-rfq-doc-card strong,
.stage6-rfq-doc-card small {
  display: block;
  overflow-wrap: anywhere;
}
.stage6-rfq-doc-card strong {
  margin-top: 4px;
  color: var(--text);
}
.stage6-rfq-doc-card small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}
.stage6-rfq-doc-card .document-actions {
  justify-content: end;
}
.stage6-rfq-package-link {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(82,174,116,.28);
  border-radius: 8px;
  background: rgba(82,174,116,.08);
}
.stage6-rfq-package-link strong {
  color: var(--text);
}
.stage6-rfq-package-link a {
  color: var(--gold-2);
  overflow-wrap: anywhere;
}

.mail-tracking-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(82,174,116,.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(82,174,116,.1), rgba(216,155,47,.055));
}
.mail-tracking-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.mail-tracking-head h3,
.mail-tracking-focus h4,
.mail-tracking-followup h4 {
  margin: 7px 0 4px;
  color: var(--text);
}
.mail-tracking-head p,
.mail-tracking-focus p,
.mail-tracking-followup p,
.mail-tracking-timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.mail-tracking-score {
  display: grid;
  place-items: center;
  min-width: 96px;
  padding: 14px;
  border: 1px solid rgba(82,174,116,.26);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.mail-tracking-score strong {
  color: var(--gold-2);
  font-size: 28px;
  line-height: 1;
}
.mail-tracking-score span,
.mail-tracking-metrics span,
.mail-tracking-timeline span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.mail-tracking-metrics,
.mail-tracking-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.mail-tracking-metrics article,
.mail-tracking-timeline article,
.mail-tracking-focus,
.mail-tracking-followup {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.mail-tracking-metrics strong,
.mail-tracking-timeline strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  overflow-wrap: anywhere;
}
.mail-tracking-focus {
  display: grid;
  grid-template-columns: minmax(220px, .35fr) minmax(0, 1fr);
  gap: 12px;
}
.mail-tracking-followup {
  display: grid;
  grid-template-columns: minmax(220px, .35fr) minmax(0, 1fr);
  gap: 12px;
  border-color: rgba(216,155,47,.28);
}
.mail-tracking-followup pre {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: inherit;
  line-height: 1.45;
}

.stage7-inbox-center {
  display: grid;
  gap: 16px;
}
.stage7-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 14px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(5,12,12,.97), rgba(3,5,5,.94));
}
.stage7-hero h3 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.04;
  text-transform: uppercase;
}
.stage7-hero p,
.stage7-metrics p,
.stage7-list p,
.stage7-detail p,
.stage7-ai-summary p,
.stage7-materials p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}
.stage7-sync-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.stage7-sync-form label {
  display: grid;
  gap: 7px;
}
.stage7-simple-mail-panel {
  display: grid;
  grid-template-columns: minmax(260px, .45fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(82,174,116,.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(82,174,116,.085), rgba(0,0,0,.2));
}
.stage7-simple-mail-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}
.stage7-simple-mail-copy h3 {
  margin: 6px 0 2px;
  color: var(--text);
}
.stage7-simple-mail-copy p {
  margin: 0;
  color: var(--muted);
}
.stage7-simple-mail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.stage7-simple-compose-form {
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(220px, .85fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
}
.stage7-simple-compose-form .wide-field {
  grid-column: span 2;
}
.stage7-simple-compose-form label {
  margin: 0;
}
.stage7-simple-compose-form input,
.stage7-simple-compose-form select,
.stage7-simple-compose-form textarea {
  width: 100%;
}
.stage7-folder-bar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.stage7-folder-bar button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.stage7-folder-bar button.active {
  border-color: rgba(216,155,47,.58);
  background: rgba(216,155,47,.12);
}
.stage7-folder-bar span,
.stage7-folder-bar strong {
  min-width: 0;
}
.stage7-folder-bar strong {
  color: var(--gold-2);
}
.stage7-mail-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.stage7-mail-toolbar label {
  display: grid;
  gap: 7px;
}
.stage7-sync-form span,
.stage7-mail-toolbar span,
.stage7-metrics span,
.stage7-ai-summary span {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.stage7-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stage7-metrics article,
.stage7-list,
.stage7-detail,
.stage7-manual-form,
.stage7-compose-form,
.stage7-mail-action-form,
.stage7-ai-summary article,
.stage7-materials article,
.stage7-mail-body {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.stage7-metrics article {
  padding: 14px;
}
.stage7-metrics strong,
.stage7-ai-summary strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}
.stage7-grid {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}
.stage7-list,
.stage7-detail {
  display: grid;
  gap: 12px;
  padding: 18px;
  min-width: 0;
}
.stage7-mail-card {
  width: 100%;
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  cursor: pointer;
}
.stage7-mail-card.active {
  border-color: rgba(216,155,47,.58);
  background: rgba(216,155,47,.09);
}
.stage7-mail-card.assigned {
  border-color: rgba(76,138,98,.5);
}
.stage7-mail-card strong,
.stage7-detail h3,
.stage7-materials h4,
.stage7-mail-body h4,
.stage7-manual-form h3,
.stage7-compose-form h3,
.stage7-mail-action-form h3 {
  margin: 0;
  color: var(--text);
}
.stage7-mail-card small {
  color: var(--gold-2);
  font-weight: 700;
}
.stage7-detail-head {
  display: grid;
  gap: 8px;
}
.stage7-ai-summary,
.stage7-materials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stage7-materials {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stage7-ai-summary article,
.stage7-materials article,
.stage7-mail-body,
.stage7-manual-form,
.stage7-compose-form,
.stage7-mail-action-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  min-width: 0;
}
.stage7-compose-form {
  background: rgba(76,138,98,.08);
  border-color: rgba(76,138,98,.28);
}
.stage7-mail-action-form {
  background: rgba(216,155,47,.07);
  border-color: rgba(216,155,47,.24);
}
.stage7-assign-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .35fr) auto;
  gap: 10px;
  align-items: end;
}
.stage7-assign-form .wide-field {
  grid-column: auto;
}
.stage7-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stage7-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stage7-flags span {
  padding: 7px 9px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(216,155,47,.08);
  font-size: 12px;
  font-weight: 800;
}
.stage7-materials a {
  display: block;
  color: var(--gold-2);
  font-weight: 800;
  word-break: break-word;
}
.stage7-mail-body pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: inherit;
  line-height: 1.48;
}

.case360-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
}

.case360-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 820px;
  overflow: auto;
}

.case360-list-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.case360-list-item.active {
  border-color: var(--gold);
  background: rgba(216, 155, 47, 0.12);
}

.case360-list-item small {
  grid-column: 2;
  color: var(--muted);
  white-space: normal;
}

.sla-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.sla-dot.warning { background: var(--gold); }
.sla-dot.critical { background: var(--red); }

.case360-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.case360-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
}

.case360-hero.critical { border-color: rgba(157, 77, 67, 0.72); }
.case360-hero.warning { border-color: rgba(216, 155, 47, 0.55); }

.case360-sla {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.24);
}

.sla-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(76, 138, 98, 0.65);
  color: #c7f2d4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sla-pill.warning {
  border-color: rgba(216, 155, 47, 0.7);
  color: var(--gold-2);
}

.sla-pill.critical {
  border-color: rgba(157, 77, 67, 0.8);
  color: #ffb0a6;
}

.case360-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.case360-metrics article {
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
}

.case360-metrics strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
}

.case360-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.case-checklist-panel { padding: 18px; }

.case-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.case-checklist label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.18);
}

.case-checklist label.checked {
  border-color: rgba(76, 138, 98, 0.62);
  background: rgba(76, 138, 98, 0.1);
}

.case-checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.case-checklist small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.sharing-center {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sharing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: start;
  padding: 18px;
}

.sharing-card.warning {
  border-color: rgba(216, 155, 47, 0.58);
}

.visibility-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.visibility-badges span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(216, 155, 47, 0.34);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
}

.sharing-controls {
  display: grid;
  gap: 10px;
}

.package-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.package-shortcut-card {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(8,14,14,.72);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.package-shortcut-card.primary {
  border-color: rgba(216,155,47,.42);
  background:
    linear-gradient(135deg, rgba(216,155,47,.18), rgba(8,14,14,.82)),
    rgba(8,14,14,.72);
}

.package-shortcut-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.package-shortcut-card strong {
  font-size: clamp(17px, 2vw, 22px);
}

.package-shortcut-card small {
  color: var(--muted);
  line-height: 1.45;
}

.package-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.package-form,
.package-preview {
  padding: 18px;
}

.package-doc-picker {
  max-height: 360px;
  overflow: auto;
}

.package-preview {
  position: sticky;
  top: 104px;
}
.external-quote-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10,18,18,.86), rgba(3,6,6,.92)),
    radial-gradient(circle at 96% 4%, rgba(216,155,47,.12), transparent 30%);
  min-width: 0;
}
.external-quote-form {
  display: grid;
  gap: 12px;
}
.safe-brief-audit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(76,138,98,.36);
  border-radius: 8px;
  background: rgba(76,138,98,.08);
}
.safe-brief-audit strong {
  display: block;
  color: var(--gold-2);
  font-size: 13px;
  text-transform: uppercase;
}
.safe-brief-audit small,
.muted-field small,
.safe-output-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}
.safe-brief-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.safe-brief-badges span {
  padding: 7px 9px;
  border: 1px solid rgba(76,138,98,.38);
  border-radius: 999px;
  color: #cfe7d5;
  background: rgba(76,138,98,.12);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.safe-brief-badges span.danger {
  border-color: rgba(196,94,67,.48);
  color: #f0b9a8;
  background: rgba(196,94,67,.13);
}
.muted-field textarea {
  color: rgba(239,232,216,.72);
  background: rgba(255,255,255,.035);
}
.safe-output-field textarea {
  border-color: rgba(76,138,98,.55);
  background: rgba(76,138,98,.08);
}
.external-quote-card {
  border-color: rgba(216,155,47,.28);
}
.external-quote-card .compact-status {
  display: grid;
  gap: 5px;
}
.external-quote-card .compact-status span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.package-doc-picker label.blocked {
  opacity: .72;
  border-color: rgba(196,94,67,.35);
  color: #f0b9a8;
  background: rgba(196,94,67,.08);
}
.package-doc-picker label.blocked input {
  filter: grayscale(1);
}

@media (max-width: 980px) {
  .case360-shell,
  .case360-hero,
  .sharing-card,
  .package-shortcuts,
  .package-builder {
    grid-template-columns: 1fr;
  }

  .case360-list {
    max-height: none;
  }

  .safe-brief-audit {
    grid-template-columns: 1fr;
  }
  .safe-brief-badges {
    justify-content: flex-start;
  }

  .case360-metrics,
  .case-checklist,
  .case360-grid {
    grid-template-columns: 1fr;
  }

  .package-preview {
    position: static;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(5, 6, 6, 0.94), rgba(5, 6, 6, 0.98)),
    url("assets/hero-machine.webp") center top / cover fixed no-repeat,
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; min-width: 0; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.92);
  backdrop-filter: blur(18px);
}

.site-header[data-elevated="true"] { box-shadow: 0 18px 45px rgba(0, 0, 0, 0.44); }
.brand img, .site-footer img { width: 100%; max-width: 230px; height: auto; }

.primary-nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 1.55vw, 24px);
  min-width: 0;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 2px;
  color: rgba(245, 240, 232, 0.9);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 160ms ease;
}

.primary-nav a:hover { color: var(--gold-2); }
.primary-nav a[href="app.html"],
.primary-nav a[href="#micro-b2b"],
.primary-nav a[href="#factory-partners"],
.site-header .header-actions a[href="app.html"] {
  display: none !important;
}
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-actions .button { min-height: 38px; padding: 9px 13px; font-size: 11px; }
.partner-entry { white-space: nowrap; }

.language-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(216, 155, 47, 0.32);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.language-switcher button {
  min-width: 38px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.language-switcher button.active { color: #050505; background: var(--gold); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.36);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gold-2);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button-primary { color: #050505; background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 12px 30px rgba(216, 155, 47, .16); }
.button-ghost { border-color: rgba(216, 155, 47, .44); color: var(--text); background: rgba(0, 0, 0, .24); }
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(216,155,47,.4);
  border-radius: 6px;
  color: var(--text);
  background: rgba(0,0,0,.22);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
}
.small-button.primary { color: #050505; border-color: transparent; background: var(--gold); }
.small-button.danger {
  border-color: rgba(157,77,67,.55);
  color: #ffd8d3;
  background: rgba(157,77,67,.16);
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  color: var(--gold-2);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 20%, rgba(216, 155, 47, .12), transparent 32%),
    linear-gradient(90deg, rgba(5, 6, 6, .88), rgba(5, 6, 6, .64));
}

.hero-grid {
  width: min(calc(100% - 72px), var(--max));
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(450px, .95fr) minmax(520px, 1.05fr);
  gap: 52px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(46px, 5.4vw, 86px);
  line-height: .98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.lead { max-width: 760px; color: var(--muted); font-size: 19px; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-media {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 610px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img:first-child { grid-row: 1 / -1; }

.signal-strip {
  width: min(calc(100% - 72px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(216,155,47,.18);
  overflow: hidden;
  transform: translateY(-1px);
}

.signal-strip article {
  position: relative;
  display: grid;
  align-content: center;
  gap: 9px;
  min-height: 118px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.96), rgba(5,7,7,.98)),
    radial-gradient(circle at 92% 18%, rgba(216,155,47,.18), transparent 34%);
}

.signal-strip article::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 16px;
  width: 36px;
  height: 2px;
  background: var(--gold);
}
.signal-strip strong {
  color: var(--gold-2);
  font-size: clamp(28px, 3vw, 42px);
  line-height: .95;
  letter-spacing: 0;
  white-space: nowrap;
}
.signal-strip span {
  max-width: 190px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.22;
  text-transform: uppercase;
}

.app-install-page .site-header {
  grid-template-columns: 240px minmax(0, 1fr) auto;
}

.app-install-page code {
  color: var(--gold-2);
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 900;
}

.app-standalone-page [hidden] {
  display: none !important;
}

.app-install-hero {
  border-bottom: 1px solid var(--line);
}

.app-install-grid {
  min-height: 660px;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, .62fr);
  gap: 56px;
}

.app-install-copy h1 {
  max-width: 780px;
  font-size: 64px;
  line-height: .98;
  letter-spacing: 0;
}

.app-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.app-install-status {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(76,138,98,.45);
  border-radius: 8px;
  background: rgba(76,138,98,.1);
  color: #d8efdf;
  font-size: 13px;
  line-height: 1.45;
}

.app-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.app-trust-strip article,
.app-install-steps article,
.app-install-official-box,
.app-phone-body article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.app-trust-strip article {
  min-width: 0;
  padding: 12px;
}

.app-trust-strip strong,
.app-install-steps strong,
.app-install-official-box strong,
.app-phone-body strong {
  display: block;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-trust-strip span,
.app-install-steps span,
.app-install-official-box span,
.app-phone-body span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.app-install-device {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 0;
}

.app-phone-shell {
  width: min(100%, 360px);
  min-height: 560px;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.32);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(17,28,27,.96), rgba(5,6,6,.98)),
    radial-gradient(circle at 70% 12%, rgba(240,193,104,.16), transparent 34%);
  box-shadow: var(--shadow);
}

.app-phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px 18px 8px 8px;
  background: rgba(255,255,255,.045);
}

.app-phone-body {
  display: grid;
  gap: 10px;
  padding: 12px 0 0;
}

.app-phone-body article {
  padding: 13px;
}

.app-install-signals {
  margin-top: 0;
}

.app-install-section {
  padding-top: 72px;
}

.app-install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.app-install-steps article {
  padding: 16px;
}

.app-install-official-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(216,155,47,.1), rgba(255,255,255,.035)),
    rgba(255,255,255,.035);
}

.app-standalone-section {
  padding-top: 72px;
}

.app-dedicated-link .app-install-hero,
.app-dedicated-link .app-install-signals,
.app-dedicated-link .app-install-section {
  display: none;
}

.app-dedicated-link .app-install-header {
  position: static;
  border-bottom: 1px solid rgba(216,155,47,.2);
  background: rgba(5,8,8,.98);
}

.app-dedicated-link .primary-nav,
.app-dedicated-link .header-actions {
  display: none;
}

.app-dedicated-link .app-standalone-section {
  min-height: calc(100vh - 82px);
  display: grid;
  align-content: center;
  padding-top: 38px;
}

.app-dedicated-link .section-heading {
  max-width: 760px;
}

.app-dedicated-link .section-heading h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.app-dedicated-link .app-standalone-grid {
  grid-template-columns: minmax(320px, 520px) minmax(360px, 1fr);
}

.app-dedicated-link:not(.app-session-ready) .app-standalone-grid {
  grid-template-columns: minmax(320px, 520px);
  max-width: 560px;
}

.app-dedicated-link:not(.app-session-ready) .app-live-card {
  display: none;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-install-header,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .section-heading,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) #inviteBox,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-login-card {
  display: none;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-standalone-section {
  min-height: 100vh;
  align-content: stretch;
  padding-top: 0;
  background: #f7faf8;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-standalone-grid {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px;
  grid-template-columns: 1fr;
  align-items: center;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card {
  border-color: rgba(31,111,74,.2);
  background: #f7faf8;
  color: #14201b;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-app-topbar {
  border-color: rgba(31,111,74,.14);
  background: #fff;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-brand-lockup > div strong,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-brand-lockup > div h2,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .dashboard-card h3,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-case-card h4,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .app-mail-card h4,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .ceig-app-thread h4 {
  color: #14201b;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-brand-lockup > div span,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .dashboard-card p,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-case-card p,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-case-card small,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .app-mail-card p,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .app-mail-card small,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .social-user-card small,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .column-head p {
  color: #526158;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .dashboard-card,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-case-card,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .app-mail-card,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .social-user-card,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .chat-message {
  background: #fff;
  color: #14201b;
}

.app-pwa-launch:not(.app-session-ready) .app-install-header,
.app-pwa-launch:not(.app-session-ready) .section-heading p,
.app-pwa-launch:not(.app-session-ready) #inviteBox,
.app-pwa-launch:not(.app-session-ready) #appLoginForm small {
  display: none;
}

.app-pwa-launch:not(.app-session-ready) .app-standalone-section {
  min-height: 100vh;
  padding-top: 24px;
}

.app-pwa-launch:not(.app-session-ready) .section-heading {
  text-align: center;
  margin-bottom: 16px;
}

.app-pwa-launch:not(.app-session-ready) .section-heading h2 {
  font-size: 32px;
}

.pwa-install-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 auto 16px;
  max-width: 760px;
  padding: 14px;
  border: 1px solid rgba(31,111,74,.18);
  border-radius: 10px;
  background: #f7faf8;
  color: #14201b;
  box-shadow: 0 12px 30px rgba(20,32,27,.08);
}

.pwa-install-notice[hidden] {
  display: none;
}

.app-session-ready .pwa-install-notice {
  display: none;
}

.pwa-install-notice h3,
.pwa-install-notice p {
  margin: 4px 0 0;
}

.pwa-install-actions {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.pwa-install-actions small {
  color: #526158;
  line-height: 1.4;
}

.app-setup-inside-app .section-heading,
.app-setup-inside-app #inviteBox,
.app-setup-inside-app #appLoginForm {
  display: none;
}

.app-setup-inside-app .app-standalone-section {
  min-height: 100vh;
  padding-top: 24px;
}

.app-setup-inside-app .app-standalone-grid {
  max-width: 760px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.app-setup-inside-app .app-login-card {
  display: none;
}

.app-setup-inside-app .app-live-card {
  border-color: rgba(31,111,74,.2);
  background: #f7faf8;
  color: #14201b;
}

.app-setup-inside-app .app-standalone-kpis,
.app-setup-inside-app .app-mobile-tabs {
  display: none;
}

.app-setup-inline {
  padding: 14px;
  border: 1px solid rgba(31,111,74,.18);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20,32,27,.08);
}

.app-setup-account {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(31,111,74,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.74);
}

.app-setup-account strong,
.app-setup-account span {
  overflow-wrap: anywhere;
}

.app-setup-account span {
  color: #526158;
  font-size: 12px;
}

.app-setup-inline .system-form {
  margin: 0;
}

.app-setup-inline .system-form h3 {
  margin-top: 0;
}

.app-standalone-grid {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(420px, 1.25fr);
  gap: 16px;
  align-items: start;
}

.app-login-card,
.app-live-card,
.app-invite-box article,
.app-integrated-note {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.app-login-card,
.app-live-card {
  display: grid;
  gap: 12px;
}

.private-app-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(216,155,47,.1), transparent 42%),
    var(--ink);
}

.private-app-card {
  width: min(100%, 520px);
}

.private-app-card h1 {
  margin: 8px 0 0;
  color: var(--paper);
  font-size: 28px;
  line-height: 1.1;
}

.private-app-card p {
  color: var(--muted);
  line-height: 1.55;
}

.app-invite-box {
  display: grid;
  gap: 10px;
}

.app-invite-box strong,
.app-integrated-note strong {
  display: block;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-invite-box span,
.app-integrated-note span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.app-workspace-preview {
  display: grid;
  gap: 12px;
}

.app-workspace-preview > article {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.app-workspace-preview > article strong,
.app-workspace-preview > article span {
  display: block;
}

.app-workspace-preview > article strong {
  color: var(--gold-2);
}

.app-workspace-preview > article span {
  margin-top: 6px;
  color: var(--muted);
}

.app-mobile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.app-mobile-tabs span,
.app-mobile-tab-button {
  padding: 7px 9px;
  border: 1px solid rgba(240,193,104,.22);
  border-radius: 999px;
  background: rgba(216,155,47,.08);
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-mobile-tab-button {
  min-height: 34px;
  cursor: pointer;
  font-family: inherit;
}

.app-mobile-tab-button.active,
.app-mobile-tab-button:hover {
  background: #1f6f4a;
  border-color: rgba(31,111,74,.42);
  color: #fff;
}

.ceig-app-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px 0;
  background: #f7faf8;
}

.ceig-app-home-hero,
.ceig-app-view {
  border: 1px solid rgba(31,111,74,.16);
  border-radius: 10px;
  background: #fff;
  color: #14201b;
  box-shadow: 0 12px 30px rgba(20,32,27,.08);
}

.ceig-app-home-hero {
  margin: 0;
}

.ceig-app-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ceig-app-tile,
.ceig-app-case-button,
.ceig-app-conversation {
  width: 100%;
  border: 1px solid rgba(31,111,74,.14);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.ceig-app-tile:hover,
.ceig-app-case-button:hover,
.ceig-app-case-button.active,
.ceig-app-conversation:hover,
.ceig-app-conversation.active {
  border-color: rgba(31,111,74,.45);
  box-shadow: 0 10px 24px rgba(31,111,74,.12);
}

.ceig-app-view {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.ceig-app-list {
  display: grid;
  gap: 10px;
}

.ceig-app-split,
.ceig-app-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 12px;
}

.ceig-app-thread {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31,111,74,.12);
  border-radius: 10px;
  background: #f7faf8;
}

.ceig-app-thread h4 {
  margin: 0;
}

.ceig-app-messages {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.ceig-app-compose {
  border-color: rgba(31,111,74,.14);
  background: #fff;
  color: #14201b;
}

.ceig-app-compose textarea {
  min-height: 86px;
}

.ceig-app-compose input:disabled,
.ceig-app-compose textarea:disabled {
  opacity: 1;
  background: #f7faf8;
  color: #526158;
  -webkit-text-fill-color: #526158;
}

.ceig-app-compose button:disabled {
  opacity: 1;
  background: #e4d2a7;
  color: #5c5b54;
  cursor: not-allowed;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) {
  background: #eef4ef;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-standalone-section {
  background:
    linear-gradient(180deg, #eef4ef 0%, #f8faf7 42%, #eef4ef 100%);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-standalone-grid {
  width: min(100%, 460px);
  padding: 0;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card {
  min-height: 100vh;
  padding: 0 14px 92px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 -14px 12px;
  padding: 18px 18px 12px;
  border: 0;
  border-bottom: 1px solid rgba(31,111,74,.08);
  border-radius: 0 0 22px 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 36px rgba(31,111,74,.1);
  backdrop-filter: blur(14px);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .mobile-brand-lockup {
  gap: 10px;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .ceig-app-wordmark {
  color: #173a2b;
  font-size: 22px;
  letter-spacing: 0;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .mobile-brand-lockup > div strong {
  font-size: 14px;
  color: #173a2b;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .mobile-brand-lockup > div span {
  margin-top: 2px;
  color: #69766e;
  font-size: 12px;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .profile-avatar.small {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(31,111,74,.18);
  background: #f5f0e5;
  color: #173a2b;
  font-weight: 900;
}

.ceig-app-hero-card,
.ceig-app-panel-card {
  min-width: 0;
  border: 1px solid rgba(31,111,74,.1);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  color: #173a2b;
  box-shadow: 0 18px 45px rgba(31,111,74,.09);
}

.ceig-app-hero-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(31,111,74,.96), rgba(27,82,61,.92)),
    #1f6f4a;
  color: #fff;
}

.ceig-app-hero-card h3,
.ceig-app-hero-card p {
  margin: 0;
}

.ceig-app-hero-card h3 {
  margin-top: 8px;
  color: #fff;
  font-size: 26px;
  line-height: 1.04;
}

.ceig-app-hero-card p {
  max-width: 320px;
  color: rgba(255,255,255,.82);
  line-height: 1.45;
}

.ceig-app-kicker {
  display: inline-flex;
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #f2c56e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ceig-app-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ceig-app-hero-actions .small-button,
.ceig-app-section-head button {
  min-height: 34px;
  border-radius: 999px;
}

.ceig-app-hero-actions .small-button.light {
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
}

.ceig-app-panel-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ceig-app-panel-card.slim {
  padding: 10px;
}

.ceig-app-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.ceig-app-section-head h3,
.ceig-app-section-head p {
  margin: 0;
}

.ceig-app-section-head h3 {
  color: #173a2b;
  font-size: 21px;
}

.ceig-app-section-head p {
  margin-top: 4px;
  color: #69766e;
  font-size: 13px;
  line-height: 1.42;
}

.ceig-app-section-head button {
  border: 1px solid rgba(31,111,74,.16);
  background: #eef4ef;
  color: #1f6f4a;
  font-weight: 900;
}

.ceig-app-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ceig-app-module {
  min-width: 0;
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(31,111,74,.1);
  border-radius: 18px;
  background: #f8faf7;
  color: #173a2b;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.ceig-app-module.static {
  cursor: default;
}

.ceig-app-module:hover,
.ceig-app-module:focus-visible {
  border-color: rgba(31,111,74,.3);
  box-shadow: 0 12px 28px rgba(31,111,74,.1);
  outline: 0;
}

.ceig-app-module span,
.ceig-app-file-row > span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: #e8f1ea;
  color: #1f6f4a;
  font-size: 11px;
  font-weight: 900;
}

.ceig-app-module strong {
  color: #173a2b;
  font-size: 16px;
}

.ceig-app-module small {
  color: #69766e;
  line-height: 1.35;
}

.ceig-app-link-list,
.ceig-app-list {
  display: grid;
  gap: 10px;
}

.ceig-app-link-list button,
.ceig-app-case-row,
.ceig-app-mail-row,
.ceig-app-file-row,
.ceig-app-conversation,
.ceig-app-person-row {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(31,111,74,.09);
  border-radius: 16px;
  background: #fff;
  color: #173a2b;
  text-align: left;
  font-family: inherit;
}

.ceig-app-link-list button,
.ceig-app-case-row,
.ceig-app-conversation {
  cursor: pointer;
}

.ceig-app-link-list button {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.ceig-app-link-list button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f1ea;
  color: #1f6f4a;
  font-size: 11px;
  font-weight: 900;
}

.ceig-app-link-list button strong,
.ceig-app-link-list button small {
  grid-column: 2;
}

.ceig-app-case-row.active,
.ceig-app-conversation.active {
  border-color: rgba(31,111,74,.34);
  box-shadow: 0 12px 30px rgba(31,111,74,.08);
}

.ceig-app-case-row > div,
.ceig-app-file-row > div,
.ceig-app-person-row > div,
.ceig-app-conversation > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ceig-app-case-row strong,
.ceig-app-mail-row strong,
.ceig-app-file-row strong,
.ceig-app-person-row strong,
.ceig-app-conversation strong {
  color: #173a2b;
  font-size: 15px;
}

.ceig-app-case-row span,
.ceig-app-case-row p,
.ceig-app-case-row small,
.ceig-app-mail-row span,
.ceig-app-mail-row p,
.ceig-app-mail-row small,
.ceig-app-file-row small,
.ceig-app-person-row small,
.ceig-app-conversation small {
  color: #69766e;
  line-height: 1.4;
}

.ceig-app-case-row strong,
.ceig-app-case-row span,
.ceig-app-case-row p,
.ceig-app-case-row small,
.ceig-app-file-row strong,
.ceig-app-file-row small,
.ceig-app-person-row strong,
.ceig-app-person-row small,
.ceig-app-conversation strong,
.ceig-app-conversation small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ceig-app-mail-row > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ceig-app-mail-row > div span {
  flex: 0 0 auto;
  color: #1f6f4a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ceig-app-file-row,
.ceig-app-person-row,
.ceig-app-conversation {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.ceig-app-file-row > small {
  justify-self: end;
}

.ceig-app-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ceig-app-media-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(31,111,74,.1);
  border-radius: 18px;
  background: #fff;
}

.ceig-app-media-thumb {
  min-height: 116px;
  border-radius: 16px;
}

.ceig-app-chat-layout,
.ceig-app-split {
  grid-template-columns: 1fr;
}

.ceig-app-thread {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(31,111,74,.1);
  border-radius: 18px;
  background: #f8faf7;
}

.ceig-app-thread h4 {
  margin: 0;
  color: #173a2b;
  font-size: 18px;
}

.ceig-app-messages {
  display: grid;
  gap: 10px;
}

.ceig-app-thread .chat-message {
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #173a2b;
  box-shadow: none;
}

.ceig-app-thread .chat-message.mine {
  background: #e8f1ea;
}

.ceig-app-thread .chat-message strong {
  color: #d89b2f;
}

.ceig-app-thread .chat-message small,
.ceig-app-thread .chat-message p {
  color: #5d6b63;
}

.ceig-app-thread .chat-message p {
  margin: 7px 0 0;
}

.ceig-app-chat-screen {
  gap: 12px;
}

.ceig-chat-search {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d8e0da;
  border-radius: 14px;
  background: #fff;
  color: #4d5e55;
  font: inherit;
  box-shadow: none;
}

.ceig-chat-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ceig-chat-filters button,
.ceig-chat-composer button {
  min-height: 34px;
  border: 1px solid #d8e0da;
  border-radius: 12px;
  background: #fff;
  color: #45564f;
  font-size: 12px;
  font-weight: 900;
}

.ceig-chat-filters button.active,
.ceig-chat-composer button.primary {
  border-color: #1f6f4a;
  background: #1f6f4a;
  color: #fff;
}

.ceig-chat-privacy,
.ceig-chat-warning {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(31,111,74,.16);
  border-radius: 10px;
  background: #eef8f2;
  color: #174631;
  font-size: 12px;
  line-height: 1.35;
}

.ceig-chat-privacy.partner {
  background: #f8faf7;
}

.ceig-chat-privacy.compact {
  padding: 8px;
  font-size: 11px;
}

.ceig-chat-warning {
  border-color: rgba(216,155,47,.36);
  background: #fff7e8;
  color: #7a520f;
}

.ceig-chat-people,
.ceig-partner-groups {
  display: grid;
  gap: 9px;
}

.ceig-chat-person,
.ceig-partner-groups button,
.ceig-partner-groups article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dce4de;
  border-radius: 12px;
  background: #fff;
  color: #102a20;
  text-align: left;
  font-family: inherit;
}

.ceig-partner-groups article {
  grid-template-columns: 1fr;
}

.ceig-chat-person.active {
  border-color: rgba(31,111,74,.34);
  box-shadow: inset 0 0 0 1px rgba(31,111,74,.12);
}

.ceig-chat-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #edf3f0;
  color: #41556a;
  font-weight: 900;
}

.ceig-chat-avatar i {
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2b8060;
}

.ceig-chat-avatar i:not(.on) {
  background: #9aa7a0;
}

.ceig-chat-person span:nth-child(2),
.ceig-chat-thread-head div,
.ceig-partner-groups button span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ceig-chat-person strong,
.ceig-chat-thread-head strong,
.ceig-partner-groups strong {
  color: #06172d;
  font-size: 14px;
}

.ceig-chat-person small,
.ceig-chat-thread-head small,
.ceig-partner-groups span {
  color: #4d5e75;
  font-size: 11px;
  line-height: 1.3;
}

.ceig-chat-person em,
.ceig-chat-thread-head em,
.ceig-partner-groups em {
  min-width: 28px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #e8f4ee;
  color: #1f6f4a;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.ceig-chat-thread-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #dce4de;
  border-radius: 16px;
  background: #fff;
}

.ceig-chat-thread-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #dce4de;
  border-radius: 12px;
  background: #f8faf7;
}

.ceig-chat-message {
  max-width: 88%;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dce4de;
  border-radius: 12px;
  background: #fff;
  color: #06172d;
}

.ceig-chat-message.mine {
  justify-self: end;
  background: #eaf4ff;
  border-color: #cfe0f4;
}

.ceig-chat-message small {
  color: #607086;
  font-size: 10px;
}

.ceig-chat-message p {
  margin: 0;
  color: #06172d;
  font-size: 13px;
  line-height: 1.35;
}

.ceig-chat-attachment {
  padding: 9px;
  border: 1px solid #dce4de;
  border-radius: 9px;
  background: #f8faf7;
  color: #4d5e75;
  font-size: 11px;
}

.ceig-chat-composer {
  display: grid;
  gap: 8px;
}

.ceig-chat-composer input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d8e0da;
  border-radius: 14px;
  background: #fff;
  color: #173a2b;
  box-shadow: none;
}

.ceig-chat-composer div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ceig-app-camera-screen {
  gap: 12px;
}

.ceig-camera-capture {
  display: grid;
  gap: 10px;
}

.ceig-camera-preview {
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(6,23,45,.06), rgba(6,23,45,.34)),
    radial-gradient(circle at 18% 18%, rgba(216,155,47,.55), transparent 26%),
    linear-gradient(135deg, #eaf1ed, #cbd9d0);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(31,111,74,.12);
}

.ceig-camera-preview span {
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.ceig-camera-preview strong {
  color: #fff;
  font-size: 23px;
}

.ceig-camera-preview small {
  color: rgba(255,255,255,.86);
}

.ceig-camera-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ceig-camera-actions label,
.ceig-camera-meta button,
.ceig-media-item button {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e0da;
  border-radius: 13px;
  background: #fff;
  color: #173a2b;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.ceig-camera-actions label.primary,
.ceig-camera-meta button.active {
  border-color: #1f6f4a;
  background: #1f6f4a;
  color: #fff;
}

.ceig-camera-actions input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.ceig-camera-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ceig-media-timeline {
  display: grid;
  gap: 9px;
}

.ceig-media-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dce4de;
  border-radius: 14px;
  background: #fff;
}

.ceig-media-thumb {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31,111,74,.14), rgba(216,155,47,.2));
  color: #1f6f4a;
  font-size: 11px;
  font-weight: 900;
}

.ceig-media-item div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ceig-media-item strong {
  color: #06172d;
  font-size: 13px;
}

.ceig-media-item span {
  color: #607086;
  font-size: 11px;
  line-height: 1.3;
}

.ceig-media-item button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f4ee;
  color: #1f6f4a;
  font-size: 11px;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) {
  background: #f3f6f8;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card {
  background: #f3f6f8;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-app-topbar {
  border-bottom: 1px solid #dce6ef;
  border-radius: 0 0 18px 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 8px 22px rgba(15,23,42,.08);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .ceig-app-wordmark {
  color: #123a2f;
  font-size: 23px;
}

.ceig-social-profile-card,
.ceig-social-stats,
.ceig-social-composer-card,
.ceig-social-feed,
.ceig-social-post,
.ceig-social-case-strip {
  border: 1px solid #d7e0e8;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}

.ceig-social-profile-card {
  overflow: hidden;
}

.ceig-social-cover {
  height: 82px;
  background:
    linear-gradient(135deg, rgba(10,102,194,.82), rgba(31,111,74,.86)),
    linear-gradient(90deg, #0a66c2, #1f6f4a);
}

.ceig-social-profile-body {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.ceig-social-avatar,
.ceig-chat-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #eaf2f8, #d9eee4);
  color: #17436b;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(15,23,42,.08);
}

.ceig-social-profile-body > .ceig-social-avatar {
  margin-top: -31px;
}

.ceig-social-avatar.small {
  width: 42px;
  height: 42px;
  border-width: 2px;
  font-size: 12px;
}

.ceig-social-profile-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
}

.ceig-social-profile-body p {
  margin: 5px 0 0;
  color: #526170;
  font-size: 13px;
  line-height: 1.45;
}

.ceig-social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ceig-social-actions button,
.ceig-social-post-actions button,
.ceig-social-feed-head button,
.ceig-social-case-strip button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #b9c9d8;
  border-radius: 999px;
  background: #fff;
  color: #0a66c2;
  font-size: 12px;
  font-weight: 900;
}

.ceig-social-actions button.primary {
  border-color: #0a66c2;
  background: #0a66c2;
  color: #fff;
}

.ceig-social-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.ceig-social-stats button {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  border: 0;
  border-right: 1px solid #e5edf4;
  background: #fff;
  text-align: left;
}

.ceig-social-stats button:last-child {
  border-right: 0;
}

.ceig-social-stats strong {
  color: #0a66c2;
  font-size: 20px;
}

.ceig-social-stats span {
  color: #526170;
  font-size: 11px;
  line-height: 1.25;
}

.ceig-social-composer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.ceig-social-composer-card button,
.ceig-social-composer-card.media > div {
  min-height: 42px;
  display: grid;
  align-content: center;
  padding: 0 14px;
  border: 1px solid #d7e0e8;
  border-radius: 999px;
  background: #f8fafc;
  color: #526170;
  text-align: left;
  font: inherit;
}

.ceig-social-composer-card.media > div {
  border-radius: 12px;
}

.ceig-social-composer-card strong {
  color: #0f172a;
  font-size: 14px;
}

.ceig-social-composer-card small {
  color: #526170;
  font-size: 12px;
}

.ceig-social-feed {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.ceig-social-feed-head,
.ceig-social-inbox-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.ceig-social-feed-head {
  padding: 13px 14px;
  border-bottom: 1px solid #e5edf4;
}

.ceig-social-feed-head h3,
.ceig-social-inbox-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}

.ceig-social-inbox-head p,
.ceig-social-feed-head p {
  margin: 4px 0 0;
  color: #526170;
  font-size: 12px;
}

.ceig-social-post {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid #e5edf4;
  border-radius: 0;
  box-shadow: none;
}

.ceig-social-post:last-child {
  border-bottom: 0;
}

.ceig-social-post-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.ceig-social-post-head strong {
  color: #0f172a;
  font-size: 14px;
}

.ceig-social-post-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ceig-social-post-head small,
.ceig-social-post p {
  display: block;
  color: #526170;
  font-size: 12px;
  line-height: 1.4;
}

.ceig-social-post p {
  margin: 0;
  color: #253443;
  font-size: 13px;
}

.ceig-social-post-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid #eef3f7;
  padding-top: 9px;
}

.ceig-social-inbox-head {
  padding-bottom: 2px;
}

.ceig-social-inbox-head button,
.ceig-social-case-strip button {
  min-height: 34px;
  padding: 0 13px;
  border-color: #b9c9d8;
  border-radius: 999px;
  background: #eef6ff;
  color: #0a66c2;
  font-size: 12px;
  font-weight: 900;
}

.ceig-social-search {
  border-color: #d7e0e8;
  border-radius: 999px;
  background: #f8fafc;
}

.ceig-social-tabs {
  padding: 4px;
  border: 1px solid #d7e0e8;
  border-radius: 999px;
  background: #f8fafc;
}

.ceig-social-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.ceig-social-tabs button.active {
  background: #0a66c2;
  color: #fff;
}

.ceig-social-policy {
  border-color: #d7e0e8;
  background: #f8fafc;
  color: #253443;
}

.ceig-chat-person {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
  border-color: #d7e0e8;
  border-radius: 12px;
  box-shadow: none;
}

.ceig-chat-person.active,
.ceig-chat-person:hover {
  border-color: rgba(10,102,194,.35);
  background: #f8fbff;
}

.ceig-chat-avatar {
  width: 50px;
  height: 50px;
  border-width: 0;
}

.ceig-chat-avatar i {
  right: 2px;
  bottom: 3px;
  border-color: #fff;
}

.ceig-chat-person strong,
.ceig-chat-thread-head strong {
  color: #0f172a;
}

.ceig-chat-person small {
  display: block;
  color: #526170;
}

.ceig-chat-person em,
.ceig-chat-thread-head em {
  background: #e8f2ff;
  color: #0a66c2;
}

.ceig-social-thread-header {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.ceig-social-thread-header > button {
  width: 34px;
  height: 34px;
  border: 1px solid #d7e0e8;
  border-radius: 50%;
  background: #fff;
  color: #0a66c2;
  font-weight: 900;
}

.ceig-social-thread-header h3,
.ceig-social-thread-header p {
  margin: 0;
}

.ceig-social-thread-header p {
  color: #526170;
  font-size: 12px;
}

.ceig-social-case-strip {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #f8fafc;
}

.ceig-social-case-strip strong {
  color: #0f172a;
  font-size: 14px;
}

.ceig-social-case-strip span {
  color: #526170;
  font-size: 12px;
  line-height: 1.35;
}

.ceig-social-thread {
  border-color: #d7e0e8;
  background: #fff;
}

.ceig-social-thread .ceig-chat-message {
  border-color: #d7e0e8;
  background: #fff;
}

.ceig-social-thread .ceig-chat-message.mine {
  border-color: #c8def8;
  background: #eef6ff;
}

.ceig-social-media-screen .ceig-social-composer-card {
  box-shadow: none;
}

.ceig-social-camera-preview {
  min-height: 176px;
  background:
    linear-gradient(180deg, rgba(15,23,42,.04), rgba(15,23,42,.42)),
    radial-gradient(circle at 20% 18%, rgba(10,102,194,.35), transparent 28%),
    linear-gradient(135deg, #dee8f0, #ccd8df);
}

.ceig-social-media-feed .ceig-media-item {
  border-color: #d7e0e8;
}

.ceig-social-media-feed .ceig-media-item button {
  background: #eef6ff;
  color: #0a66c2;
}

.ceig-app-nav {
  border-color: #d7e0e8;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
}

.app-mobile-tab-button::before {
  background: #eef3f7;
  color: #526170;
}

.app-mobile-tab-button.active {
  background: #eef6ff;
  color: #0a66c2;
}

.app-mobile-tab-button.active::before {
  background: #0a66c2;
  color: #fff;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) {
  background: linear-gradient(180deg, #f6f8f6 0%, #edf3ef 100%);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card {
  background: linear-gradient(180deg, #f6f8f6 0%, #edf3ef 100%);
}

.ceig-social-cover {
  background:
    linear-gradient(135deg, rgba(13,68,54,.98), rgba(18,35,31,.96)),
    linear-gradient(90deg, #0d4436, #12231f);
}

.ceig-social-profile-card,
.ceig-social-stats,
.ceig-social-composer-card,
.ceig-social-feed,
.ceig-social-post,
.ceig-social-case-strip,
.ceig-chat-person,
.ceig-chat-thread-card,
.ceig-social-media-feed .ceig-media-item {
  border-color: #d7e3dc;
  box-shadow: 0 10px 26px rgba(18,35,31,.06);
}

.ceig-social-avatar,
.ceig-chat-avatar {
  background: linear-gradient(135deg, #eef5f1, #dcebe3);
  color: #123a2f;
}

.ceig-social-profile-body h3,
.ceig-social-feed-head h3,
.ceig-social-inbox-head h3,
.ceig-social-thread-header h3,
.ceig-chat-person strong,
.ceig-chat-thread-head strong,
.ceig-social-case-strip strong,
.ceig-media-item strong {
  color: #10231f;
}

.ceig-social-profile-body p,
.ceig-social-stats span,
.ceig-social-post-head small,
.ceig-social-post p,
.ceig-social-inbox-head p,
.ceig-social-thread-header p,
.ceig-chat-person small,
.ceig-social-case-strip span,
.ceig-media-item span {
  color: #5f7069;
}

.ceig-social-actions button,
.ceig-social-post-actions button,
.ceig-social-feed-head button,
.ceig-social-case-strip button,
.ceig-social-inbox-head button,
.ceig-media-item button {
  border-color: #bfd2c7;
  background: #fff;
  color: #0f4f3f;
}

.ceig-social-actions button.primary {
  border-color: #0f4f3f;
  background: #0f4f3f;
  color: #fff;
}

.ceig-social-actions button:hover,
.ceig-social-post-actions button:hover,
.ceig-social-feed-head button:hover,
.ceig-social-case-strip button:hover,
.ceig-social-inbox-head button:hover {
  border-color: #0f4f3f;
  background: #eff6f2;
}

.ceig-social-stats strong {
  color: #0f4f3f;
}

.ceig-social-search,
.ceig-social-composer-card button,
.ceig-social-composer-card.media > div {
  border-color: #d7e3dc;
  background: #fbfcfb;
}

.ceig-social-tabs {
  border-color: #d7e3dc;
  background: #fbfcfb;
}

.ceig-social-tabs button {
  color: #51645c;
}

.ceig-social-tabs button.active {
  background: #0f4f3f;
  color: #fff;
}

.ceig-social-policy,
.ceig-chat-privacy {
  border-color: #cfe2d8;
  background: #f3faf6;
  color: #173a2f;
}

.ceig-chat-person.active,
.ceig-chat-person:hover {
  border-color: rgba(15,79,63,.36);
  background: #f6fbf8;
}

.ceig-chat-person em,
.ceig-chat-thread-head em {
  background: #edf7f2;
  color: #0f4f3f;
}

.ceig-social-thread-header > button {
  border-color: #cfe2d8;
  background: #fff;
  color: #0f4f3f;
}

.ceig-social-thread .ceig-chat-message.mine {
  border-color: #cfe2d8;
  background: #f3faf6;
}

.ceig-chat-warning {
  border-color: rgba(202,164,93,.48);
  background: #fffaf0;
  color: #6a4b16;
}

.ceig-social-camera-preview {
  background:
    linear-gradient(180deg, rgba(18,35,31,.06), rgba(18,35,31,.48)),
    radial-gradient(circle at 20% 18%, rgba(202,164,93,.42), transparent 28%),
    linear-gradient(135deg, #dfe9e3, #879991);
}

.ceig-camera-actions label.primary,
.ceig-camera-meta button.active {
  border-color: #0f4f3f;
  background: #0f4f3f;
  color: #fff;
}

.ceig-camera-actions label:not(.primary):hover,
.ceig-camera-meta button:not(.active):hover {
  border-color: #0f4f3f;
  background: #f3faf6;
}

.ceig-app-nav {
  border-color: #d7e3dc;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 34px rgba(18,35,31,.13);
}

.app-mobile-tab-button {
  color: #60746b;
}

.app-mobile-tab-button::before {
  background: #eef5f1;
  color: #0f4f3f;
}

.app-mobile-tab-button.active {
  background: #e6f1eb;
  color: #0f4f3f;
}

.app-mobile-tab-button.active::before {
  background: #0f4f3f;
  color: #fff;
}

.ceig-social-profile-body .ceig-social-avatar {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(202,164,93,.38), 0 8px 20px rgba(18,35,31,.12);
}

.ceig-social-cover::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, rgba(202,164,93,.95), rgba(202,164,93,.18));
}

.ceig-app-compose {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(31,111,74,.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.ceig-app-compose h3 {
  margin: 0;
  color: #173a2b;
  font-size: 16px;
}

.ceig-app-compose label {
  color: #69766e;
}

.ceig-app-compose input,
.ceig-app-compose textarea {
  width: 100%;
  border: 1px solid rgba(31,111,74,.14);
  border-radius: 14px;
  background: #f8faf7;
  color: #173a2b;
  box-shadow: none;
}

.ceig-app-compose textarea {
  min-height: 86px;
}

.ceig-app-compose small {
  color: #69766e;
}

.ceig-app-nav {
  position: fixed;
  top: auto;
  left: 50%;
  right: auto;
  bottom: 10px;
  z-index: 50;
  width: min(calc(100% - 20px), 440px);
  height: 76px;
  transform: translateX(-50%);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(62px, 1fr);
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 7px;
  border: 1px solid rgba(31,111,74,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 44px rgba(20,32,27,.16);
  backdrop-filter: blur(16px);
}

.app-mobile-tab-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  max-height: 62px;
  padding: 5px 6px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #69766e;
  font-size: 10px;
  text-transform: none;
  align-self: center;
}

.app-mobile-tab-button::before {
  content: attr(data-short);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef4ef;
  color: #1f6f4a;
  font-size: 10px;
  font-weight: 900;
}

.app-mobile-tab-button.active,
.app-mobile-tab-button:hover {
  background: #e8f1ea;
  color: #173a2b;
}

.app-mobile-tab-button.active::before {
  background: #1f6f4a;
  color: #fff;
}

.app-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31,111,74,.12);
}

.app-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1f6f4a;
}

.ceig-app-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ceig-app-media-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  color: #14201b;
}

.ceig-app-media-thumb {
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(31,111,74,.16), rgba(216,155,47,.18));
  color: #1f6f4a;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .app-install-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0;
  }

  .app-dedicated-link .app-standalone-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .app-install-device {
    place-items: start;
  }

  .app-phone-shell {
    width: 100%;
    min-height: auto;
  }

  .app-standalone-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-install-page .site-header {
    grid-template-columns: 1fr auto;
  }

  .app-install-page .primary-nav {
    display: none;
  }

  .app-install-copy h1 {
    font-size: 42px;
  }

  .app-trust-strip,
  .app-install-steps,
  .app-install-signals {
    grid-template-columns: 1fr;
  }

  .app-install-official-box {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-dedicated-link .app-standalone-section {
    min-height: auto;
    align-content: start;
    padding-top: 30px;
  }

  .app-dedicated-link .section-heading {
    margin-bottom: 18px;
  }

  .app-dedicated-link .section-heading h2 {
    font-size: 28px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .app-dedicated-link .section-heading p {
    font-size: 14px;
    line-height: 1.45;
  }

  .app-dedicated-link .app-standalone-grid {
    width: 100%;
    max-width: 100%;
  }

  .app-dedicated-link:not(.app-session-ready) .app-live-card {
    display: none;
  }

  .app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-standalone-section {
    min-height: 100vh;
    padding-top: 0;
  }

  .app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-standalone-grid {
    min-height: 100vh;
    padding: 14px;
  }

  .app-dedicated-link .app-login-card {
    padding: 14px;
    gap: 10px;
  }

  .ceig-app-tiles,
  .ceig-app-split,
  .ceig-app-chat-layout,
  .ceig-app-gallery {
    grid-template-columns: 1fr;
  }

  .app-dedicated-link .role-grants span {
    padding: 5px 7px;
    font-size: 11px;
  }
}

.section {
  width: min(calc(100% - 72px), var(--max));
  margin: 0 auto;
  padding: 66px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading { display: grid; gap: 14px; margin-bottom: 28px; }
.section-heading p { max-width: 980px; margin: 0; }
.section h2, .split-section h2, .contact-section h2 {
  max-width: 1080px;
  margin: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.04;
  text-transform: uppercase;
}

.sector-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.sector-tabs button, .portal-tabs button, .role-picker button, .offer-targets button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 8px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 11px;
  line-height: 1.12;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  white-space: normal;
  text-align: center;
}

.sector-tabs button.active, .portal-tabs button.active, .role-picker button.active, .offer-targets button.active {
  color: #050505;
  border-color: transparent;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}

.sector-workspace, .markets-layout, .split-section, .portal-grid, .contact-section, .factory-partner-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  align-items: start;
}

#capabilities.split-section {
  grid-template-columns: minmax(420px, .78fr) minmax(720px, 1.22fr);
}

.sector-panel, .login-card, .board-column, .dashboard-card, .partner-access-card, .offer-builder, .audit-card, .system-card,
.factory-settings, .system-form, .crm-card, .market-card, .capability-item, .pipeline-column, .order-item, .material-card {
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15,24,24,.94), rgba(6,9,9,.98));
}

.factory-partner-section {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: stretch;
}

.factory-partner-intro {
  min-height: 100%;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(5,7,7,.96), rgba(18,24,23,.94)),
    radial-gradient(circle at 98% 8%, rgba(216,155,47,.16), transparent 32%);
}

.factory-partner-intro h2 {
  margin: 10px 0 16px;
  color: var(--gold-2);
}

.factory-partner-intro > p {
  max-width: 980px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.factory-partner-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.factory-partner-points article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

.factory-partner-points strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-2);
  font-size: 14px;
  line-height: 1.25;
  text-transform: uppercase;
}

.factory-partner-points span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.factory-partner-application h3 {
  margin-top: 0;
  color: var(--gold-2);
  line-height: 1.25;
  text-transform: uppercase;
}

.factory-partner-form-note {
  margin: -4px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sector-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sector-hero {
  position: relative;
  flex: 1 1 390px;
  height: clamp(330px, 30vw, 430px);
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.sector-hero img { width: 100%; height: 100%; object-fit: cover; }
.sector-hero-upholstery img {
  object-position: 62% 82%;
  transform: scale(1.08);
  transform-origin: 62% 82%;
}
.sector-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.24)); }
.sector-hero-content { position: absolute; inset: auto 28px 28px; z-index: 1; max-width: 720px; }
.sector-hero-content h3 { margin: 0 0 10px; color: var(--gold-2); font-size: 32px; text-transform: uppercase; }
.sector-hero-content p { margin: 0; font-size: 17px; }
.sector-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.sector-card { min-height: 190px; padding: 18px; border: 1px solid rgba(216,155,47,.16); border-radius: 8px; background: rgba(0,0,0,.18); }
.sector-card h4 { margin: 0 0 10px; color: var(--gold-2); font-size: 16px; }
.sector-card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.sector-operating-layer {
  display: grid;
  grid-template-columns: minmax(260px, .68fr) minmax(390px, 1.32fr);
  gap: 12px;
  margin: 0 12px 12px;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10,16,16,.96), rgba(0,0,0,.32)),
    radial-gradient(circle at 98% 0%, rgba(216,155,47,.12), transparent 34%);
}
.sector-operating-copy {
  min-width: 0;
}
.sector-operating-copy h3 {
  margin: 10px 0 8px;
  color: var(--gold-2);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.08;
  text-transform: uppercase;
}
.sector-operating-copy p,
.sector-process-step p,
.sector-proof-intro p,
.sector-proof-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.sector-process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sector-process-step {
  min-width: 0;
  min-height: 98px;
  padding: 11px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.sector-process-step strong,
.sector-proof-item span {
  display: block;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.sector-process-step h4 {
  margin: 6px 0 5px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}
.sector-proof-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 12px 12px;
  align-items: stretch;
}
.sector-proof-intro,
.sector-proof-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 104px;
  padding: 13px;
  border: 1px solid rgba(216,155,47,.15);
  border-radius: 8px;
  background: rgba(216,155,47,.06);
}
.sector-proof-intro {
  justify-content: flex-start;
  background:
    linear-gradient(180deg, rgba(216,155,47,.11), rgba(0,0,0,.22)),
    radial-gradient(circle at 20% 0%, rgba(240,193,104,.16), transparent 46%);
}
.sector-proof-media {
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  min-height: 118px;
  max-height: 152px;
  margin-bottom: 11px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.28);
}
.sector-proof-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sector-proof-intro strong,
.sector-proof-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.sector-proof-item p {
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.sector-checklist,
.sector-proof-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.sector-checklist li,
.sector-proof-list li {
  position: relative;
  min-width: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.34;
}
.sector-checklist li::before,
.sector-proof-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(216,155,47,.12);
}
.sector-checklist b {
  display: block;
  color: var(--gold-2);
  font-size: 11px;
  text-transform: uppercase;
}
.sector-checklist span {
  display: block;
  margin-top: 2px;
}
.inquiry-panel {
  display: grid;
  gap: 12px;
}
.inquiry-panel, .portal-login { position: sticky; top: 96px; align-self: start; }
.system-form { padding: 22px; }
#client-inquiry-form {
  display: flex;
  flex-direction: column;
}
.message-field {
  flex: 1;
  grid-template-rows: auto minmax(170px, 1fr);
}
.message-field textarea {
  height: 100%;
  min-height: 170px;
}
.form-head span, .login-label, .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #050505;
  background: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.form-head h3, .login-card h3 { margin: 12px 0 16px; color: var(--gold-2); font-size: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.system-form, .form-grid label, input, select, textarea { min-width: 0; max-width: 100%; }
label { display: grid; gap: 7px; color: var(--text); font-size: 12px; font-weight: 900; text-transform: uppercase; }
input, textarea, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(9,14,14,.98), rgba(2,3,3,.94)),
    rgba(0,0,0,.48);
  padding: 13px 14px;
  outline: none;
  color-scheme: dark;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
select { background-color: #050808; }
select option { color: var(--text); background: #050808; }
select option:checked, select option:hover { color: #050505; background: var(--gold); }
textarea { min-height: 112px; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(200,191,180,.62); font-weight: 600; opacity: 1; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(240,193,104,.76);
  box-shadow: 0 0 0 2px rgba(240,193,104,.13), inset 0 1px 0 rgba(255,255,255,.04);
}
.wide-field {
  grid-column: 1 / -1;
}
.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(216,155,47,.38);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(0,0,0,.26);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  text-transform: uppercase;
}
.map-link:hover {
  color: #050505;
  background: var(--gold);
}
.password-input-wrap, .tax-lookup-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}
.password-input-wrap input, .tax-lookup-field input { min-width: 0; }
.password-toggle, .tax-lookup-button {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid rgba(216,155,47,.4);
  border-radius: 6px;
  color: var(--gold-2);
  background: rgba(0,0,0,.34);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 86px;
  padding: 0 12px;
}
.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.password-toggle span { line-height: 1; }
.password-toggle.active { color: #050505; background: var(--gold); border-color: transparent; }
.tax-lookup-button { padding: 0 12px; white-space: nowrap; }
.security-workbench .workbench-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .72fr);
  align-items: start;
}
.security-form {
  min-width: 0;
  border-color: rgba(216,155,47,.32);
  box-shadow: 0 22px 70px rgba(0,0,0,.32);
}
.security-form-head {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.security-form-head h3 {
  margin: 0;
  color: var(--text);
}
.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}
.account-summary article {
  min-width: 0;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  padding: 12px;
}
.account-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.account-summary strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}
.security-info {
  min-width: 0;
}
.security-info .request-card {
  min-width: 0;
  background: rgba(0,0,0,.22);
  overflow-wrap: anywhere;
}
.lookup-status {
  min-height: 16px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}
.file-field input { min-height: 46px; padding: 10px; font-size: 15px; }
.file-field { margin: 12px 0; padding: 12px; border: 1px dashed rgba(216,155,47,.34); border-radius: 8px; color: var(--muted); }
.form-status { min-height: 22px; color: var(--gold-2); font-size: 13px; }

.public-file-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.public-file-field .public-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.public-file-control {
  display: grid;
  grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  cursor: pointer;
}

.public-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(216,155,47,.62);
  border-radius: 6px;
  background: #111514;
  color: #f2c76c;
  font-weight: 800;
}

.public-file-button::before {
  content: "↑";
  margin-right: 8px;
  font-size: 17px;
  line-height: 1;
}

.public-file-status {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-file-status[data-has-files="true"] {
  color: var(--gold-2);
}

.public-file-input:focus-visible + .public-file-control .public-file-button {
  outline: 2px solid #f2c76c;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .public-file-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-file-status {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.ops-grid, .capability-list, .market-list, .dashboard-grid, .crm-grid, .report-grid, .material-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.system-card, .capability-item, .market-card, .dashboard-card, .crm-card, .material-card { padding: 20px; min-height: 170px; min-width: 0; overflow-wrap: anywhere; }
.system-card strong, .capability-item strong, .market-card strong, .dashboard-card strong { display: block; color: var(--gold-2); font-size: 13px; text-transform: uppercase; overflow-wrap: anywhere; }
.system-card h3, .capability-item h3, .market-card h3, .dashboard-card h3 { margin: 12px 0 8px; color: var(--text); font-size: 18px; }
.system-card p, .capability-item p, .market-card p, .dashboard-card p { margin: 0; color: var(--muted); font-size: 14px; }

.markets-layout { grid-template-columns: minmax(500px, .98fr) minmax(500px, 1.02fr); }
.market-left-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.market-map {
  overflow: hidden;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.94), rgba(3,5,5,.98)),
    radial-gradient(circle at 82% 0%, rgba(216,155,47,.14), transparent 36%);
  box-shadow: var(--shadow);
}
.market-map img { width: 100%; border-radius: 8px; }
.market-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-map-caption {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(216,155,47,.22);
  background: rgba(216,155,47,.18);
}
.market-map-caption article {
  min-width: 0;
  padding: 15px;
  background: rgba(0,0,0,.34);
}
.market-map-caption strong {
  display: block;
  color: var(--gold-2);
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: .95;
}
.market-map-caption span {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-map-caption p {
  margin: 5px 0 0;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.35;
}
.market-depth {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.market-cluster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.market-cluster-card,
.market-route-card {
  min-width: 0;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.95), rgba(6,9,9,.98)),
    radial-gradient(circle at 96% 0%, rgba(216,155,47,.13), transparent 34%);
}
.market-cluster-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 265px;
  padding: 18px;
}
.market-cluster-card > strong {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-cluster-card > span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.market-cluster-card h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
  text-transform: uppercase;
}
.market-cluster-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.market-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.market-tags em {
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid rgba(240,193,104,.2);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(216,155,47,.08);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.market-route-card {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, .92fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
}
.market-route-card-compact {
  grid-template-columns: 1fr;
  align-items: start;
}
.market-route-card-compact .market-route-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.market-route-card h3 {
  margin: 13px 0 9px;
  color: var(--gold-2);
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.05;
  text-transform: uppercase;
}
.market-route-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.market-route-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.market-route-steps span {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.22);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.market-route-steps strong {
  color: var(--gold-2);
  font-size: 12px;
}

.portal-grid { grid-template-columns: 300px minmax(0, 1fr); }
.portal-grid[data-locked="true"] { grid-template-columns: minmax(320px, 560px); justify-content: center; }
.portal-grid[data-locked="true"] .portal-login { position: static; }
.portal-grid[data-locked="true"] .portal-board { display: none; }
.login-card { padding: 22px; }
.login-card > p { min-height: 56px; }
.login-fields { display: grid; gap: 12px; margin: 16px 0; }
.sandbox-login-note {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(240,193,104,.32);
  border-radius: 8px;
  background: rgba(216,155,47,.08);
  color: var(--text);
}
.sandbox-login-note strong {
  color: var(--gold-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.sandbox-login-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.sandbox-credentials {
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  overflow: hidden;
}
.sandbox-credentials summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.sandbox-credentials div {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}
.sandbox-credentials button {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.2fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  background: rgba(255,255,255,.045);
}
.sandbox-credentials button:hover {
  border-color: rgba(216,155,47,.38);
  background: rgba(216,155,47,.08);
}
.sandbox-credentials span,
.sandbox-credentials small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sandbox-credentials small { color: var(--gold-2); }
.role-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; padding: 6px; border: 1px solid rgba(216,155,47,.22); border-radius: 8px; background: rgba(0,0,0,.28); }
.password-step { display: grid; gap: 10px; }
.password-step[hidden] { display: none; }
.password-step p { margin: 0; color: var(--quiet); font-size: 12px; }
.demo-access {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.demo-access h4 { margin: 0; color: var(--gold-2); font-size: 13px; text-transform: uppercase; }
.demo-access p { min-height: 0; margin: 0; color: var(--muted); font-size: 12px; }
.demo-access-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-access-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  text-align: left;
}
.demo-access-list button.active { border-color: rgba(240,193,104,.72); background: rgba(216,155,47,.12); }
.demo-access-list span { font-size: 12px; font-weight: 900; text-transform: uppercase; }
.demo-access-list small { overflow-wrap: anywhere; color: var(--quiet); font-size: 11px; }
.demo-access-list strong { grid-column: 2; grid-row: 1 / span 2; color: var(--gold-2); font-size: 11px; text-transform: uppercase; }
.portal-board { min-height: 560px; }
.portal-board, .portal-shell { min-width: 0; }
.portal-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.portal-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 174px;
  gap: 8px;
  align-items: stretch;
}
.portal-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 6px; }
.portal-tabs button {
  min-height: 44px;
  padding: 8px 6px;
  font-size: clamp(8.8px, .58vw, 10.5px);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
  hyphens: auto;
}
.backend-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.backend-status-strip.ok {
  border-color: rgba(98,164,119,.35);
  background: rgba(98,164,119,.08);
}
.backend-status-strip.warning {
  border-color: rgba(216,155,47,.45);
  background: rgba(216,155,47,.08);
}
.sandbox-safety-strip {
  border-style: dashed;
  background: rgba(216,155,47,.11);
}
.backend-status-strip small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.presence-strip {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(240,193,104,.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.18));
}
.presence-strip > div:first-child {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}
.presence-strip strong { color: var(--gold-2); font-size: 12px; text-transform: uppercase; }
.presence-strip small { grid-column: 2; color: var(--quiet); font-size: 11px; }
.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  box-shadow: 0 0 0 4px rgba(255,255,255,.04);
}
.online-dot.on { background: #4ce08a; box-shadow: 0 0 0 4px rgba(76,224,138,.14), 0 0 18px rgba(76,224,138,.42); }
.presence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.presence-list span {
  max-width: min(100%, 360px);
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 11px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.control-grid {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(320px, 1.1fr) minmax(320px, 1.1fr);
  gap: 12px;
  min-width: 0;
}
.control-metrics .dashboard-card strong {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
}
.presence-card,
.session-row,
.chat-message {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.presence-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 8px;
  padding: 10px;
}
.presence-card strong,
.session-row strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: normal;
}
.presence-card p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.presence-card small {
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.session-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: 6px 10px;
  align-items: start;
  margin-top: 8px;
  padding: 10px;
}
.session-row span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.session-row small {
  color: var(--quiet);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.chat-workbench {
  display: grid;
  grid-template-columns: minmax(280px, .36fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  margin: 14px 0;
}
.chat-case-list,
.chat-thread-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12,16,16,.9), rgba(0,0,0,.34)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.08), transparent 34%);
}
.chat-case-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
}
.chat-case {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.chat-case:hover,
.chat-case.active {
  border-color: rgba(240,193,104,.62);
  background: rgba(216,155,47,.1);
  transform: translateY(-1px);
}
.chat-case strong {
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.chat-case span,
.chat-case small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.chat-thread-panel {
  display: grid;
  gap: 12px;
}
.chat-thread {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  max-height: 520px;
  overflow: auto;
  padding: 4px;
}
.chat-message {
  display: grid;
  gap: 7px;
  width: min(720px, 92%);
  padding: 12px;
}
.chat-message.mine {
  justify-self: end;
  border-color: rgba(240,193,104,.34);
  background: rgba(216,155,47,.1);
}
.chat-message > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.chat-message strong {
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.chat-message small,
.chat-message em {
  color: var(--quiet);
  font-size: 11px;
  font-style: normal;
}
.chat-message p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.chat-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.chat-form textarea {
  min-height: 118px;
  resize: vertical;
  background: rgba(0,0,0,.42);
}
.ai-chat-summary {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(216,155,47,.12), rgba(0,0,0,.24));
}
.ai-chat-summary p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.ai-chat-summary small {
  color: var(--quiet);
  font-size: 11px;
}
.admin-partner-chat {
  display: grid;
  grid-template-columns: minmax(260px, .34fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}
.admin-partner-list,
.admin-partner-thread {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12,16,16,.92), rgba(0,0,0,.34)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.08), transparent 34%);
}
.admin-partner-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
}
.admin-partner-button {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  text-align: left;
  cursor: pointer;
}
.admin-partner-button:hover,
.admin-partner-button.active {
  border-color: rgba(240,193,104,.62);
  background: rgba(216,155,47,.1);
}
.admin-partner-button strong,
.admin-partner-button small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-partner-button strong {
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.admin-partner-button small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}
.admin-partner-thread {
  display: grid;
  gap: 12px;
}
.admin-chat-ai {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.admin-chat-assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.admin-chat-assignment select {
  min-width: 0;
}
.admin-partner-messages {
  min-height: 310px;
}
.academy-launch {
  min-height: 42px;
  border: 1px solid rgba(240,193,104,.36);
  border-radius: 8px;
  color: #080808;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 14px 30px rgba(0,0,0,.22);
  cursor: pointer;
}
.academy-launch span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: .74;
}
.academy-launch strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  text-transform: uppercase;
}
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(12px);
}
.tour-modal {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  overflow: hidden;
  border: 1px solid rgba(240,193,104,.36);
  border-radius: 10px;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 8%, rgba(216,155,47,.18), transparent 30%),
    linear-gradient(135deg, rgba(14,17,18,.98), rgba(0,0,0,.94));
  box-shadow: 0 34px 90px rgba(0,0,0,.58);
}
.tour-head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid rgba(240,193,104,.16);
}
.tour-head h2 {
  margin: 8px 0 7px;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
}
.tour-head p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.tour-exit-button {
  align-self: flex-start;
  min-width: 178px;
  padding: 12px 14px;
  border: 1px solid rgba(240,193,104,.44);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(216,155,47,.2), rgba(255,255,255,.055));
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  cursor: pointer;
  text-align: left;
}
.tour-exit-button span,
.tour-exit-button small {
  display: block;
}
.tour-exit-button span {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.tour-exit-button small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.tour-entry-note {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 18px;
  padding: 14px;
  border: 1px solid rgba(240,193,104,.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216,155,47,.13), rgba(255,255,255,.045)),
    rgba(0,0,0,.24);
}
.tour-modal.tour-started .tour-entry-note {
  display: none;
}
.tour-entry-note strong {
  display: block;
  color: var(--gold-2);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}
.tour-entry-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.tour-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.tour-entry-actions .small-button,
.tour-start-button {
  cursor: pointer;
}
.tour-start-button {
  border-color: rgba(240,193,104,.88);
  box-shadow:
    0 0 0 1px rgba(240,193,104,.18),
    0 14px 30px rgba(216,155,47,.18);
}
.tour-start-button:hover {
  transform: translateY(-1px);
}
.tour-print-button {
  border-color: rgba(240,193,104,.34);
  color: var(--gold-2);
  background: rgba(255,255,255,.035);
}
.tour-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}
.tour-side,
.tour-player {
  min-width: 0;
}
.tour-ai-card,
.tour-step-copy {
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.tour-ai-card {
  padding: 14px;
  margin-bottom: 14px;
}
.tour-ai-card h3,
.tour-side h3,
.tour-step-copy h3 {
  margin: 8px 0;
  color: var(--gold-2);
  font-size: 18px;
}
.tour-ai-card p,
.tour-step-copy p {
  color: var(--muted);
  line-height: 1.55;
}
.tour-action-grid {
  display: grid;
  gap: 8px;
}
.tour-action-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  text-align: left;
  cursor: pointer;
}
.tour-action-card.recommended {
  border-color: rgba(240,193,104,.55);
  background: rgba(216,155,47,.12);
}
.tour-action-card span {
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.tour-action-card strong,
.tour-action-card small {
  display: block;
}
.tour-action-card strong {
  margin-top: 5px;
  font-size: 14px;
}
.tour-action-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}
.tour-player {
  display: grid;
  align-content: start;
  gap: 12px;
}
.tour-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.tour-progress div {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.tour-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.tour-stage {
  min-height: 170px;
  padding: 18px;
  border: 1px solid rgba(240,193,104,.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(216,155,47,.1), rgba(255,255,255,.025)),
    rgba(0,0,0,.22);
}
.tour-device {
  position: relative;
  min-height: 132px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(3,3,3,.62);
  overflow: hidden;
}
.tour-device-bar {
  height: 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(90deg, rgba(216,155,47,.2), transparent);
}
.tour-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 22px;
}
.tour-flow span {
  position: relative;
  min-height: 58px;
  padding: 18px 10px 10px;
  border: 1px solid rgba(240,193,104,.28);
  border-radius: 8px;
  color: var(--text);
  background: rgba(216,155,47,.08);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  animation: tourPulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .24s);
}
.tour-flow span::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-2);
  transform: translateX(-50%);
  box-shadow: 0 0 0 0 rgba(240,193,104,.32);
  animation: tourDot 1.8s ease-in-out infinite;
}
@keyframes tourPulse {
  0%, 100% { transform: translateY(0); border-color: rgba(240,193,104,.24); }
  50% { transform: translateY(-3px); border-color: rgba(240,193,104,.58); }
}
@keyframes tourDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,193,104,.32); }
  50% { box-shadow: 0 0 0 8px rgba(240,193,104,0); }
}
.tour-step-copy {
  min-height: 154px;
  padding: 16px;
}
.tour-step-copy:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(240,193,104,.13);
}
.tour-step-copy ul {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.tour-step-copy li {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
  position: relative;
}
.tour-step-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
}
.tour-step-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
}
.tour-step-tabs button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.tour-step-tabs button.active {
  color: #080808;
  border-color: transparent;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.tour-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tour-disable-button {
  margin-left: auto;
  border-color: rgba(240,193,104,.3);
  color: var(--gold-2);
  background: rgba(216,155,47,.08);
}
.panel-search {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(360px, 1.1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(240,193,104,.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11,17,17,.98), rgba(0,0,0,.86)),
    radial-gradient(circle at 96% 0%, rgba(216,155,47,.16), transparent 28%);
  box-shadow: 0 18px 44px rgba(0,0,0,.18);
}
.panel-search-copy {
  min-width: 0;
}
.panel-search-copy p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.panel-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}
.panel-search-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.panel-search-form label span {
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.panel-search-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 15px;
  outline: 0;
}
.panel-search-form input:focus {
  border-color: rgba(240,193,104,.72);
  box-shadow: 0 0 0 3px rgba(216,155,47,.12);
}
.panel-search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}
.panel-search-hint {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--quiet);
  font-size: 12px;
}
.panel-search-count {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.panel-search-result {
  display: grid;
  grid-template-columns: 110px minmax(0, .9fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.panel-search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(240,193,104,.62);
  background: rgba(216,155,47,.1);
}
.panel-search-result span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(240,193,104,.22);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.panel-search-result strong,
.panel-search-result small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-search-result small {
  color: var(--muted);
  font-size: 12px;
}
.panel-search-result em {
  color: var(--gold-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.panel-search-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 12px;
  border: 1px dashed rgba(216,155,47,.22);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 13px;
}
.admin-workflow-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.admin-quick-ops {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.admin-quick-ops button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(216,155,47,.08), rgba(0,0,0,.18));
  text-align: left;
  cursor: pointer;
}
.admin-quick-ops button.active,
.admin-quick-ops button:hover {
  border-color: rgba(240,193,104,.62);
  background: rgba(216,155,47,.13);
}
.admin-quick-ops span,
.admin-quick-ops strong,
.admin-quick-ops small {
  min-width: 0;
}
.admin-quick-ops span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-quick-ops strong {
  overflow: hidden;
  color: var(--gold-2);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-quick-ops small {
  overflow: hidden;
  max-width: 150px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-simple-ops-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(82,174,116,.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(82,174,116,.075), rgba(0,0,0,.2));
}
.admin-simple-ops-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr);
  gap: 14px;
  align-items: end;
}
.admin-simple-ops-head h3 {
  margin: 7px 0 6px;
  color: var(--text);
}
.admin-simple-ops-head p {
  margin: 0;
  color: var(--muted);
}
.admin-simple-ops-head label {
  margin: 0;
}
.admin-simple-ops-actions {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.admin-simple-ops-actions button {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 76px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.2);
  text-align: left;
  cursor: pointer;
}
.admin-simple-ops-actions button:hover {
  border-color: rgba(82,174,116,.55);
  background: rgba(82,174,116,.12);
}
.admin-simple-ops-actions button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.admin-simple-ops-actions span {
  color: #ccebd5;
  font-size: 11px;
  font-weight: 900;
}
.admin-simple-ops-actions strong {
  color: var(--text);
  line-height: 1.15;
}
.admin-simple-ops-actions small {
  overflow: hidden;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-workflow-bar button,
.assistant-step-card,
.assistant-decision {
  width: 100%;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.2);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.admin-workflow-bar button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 9px 10px;
}
.admin-workflow-bar span,
.assistant-step-card span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}
.admin-workflow-bar strong {
  font-size: 11px;
  text-transform: uppercase;
}
.admin-workflow-bar small {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
}
.admin-workflow-bar button:hover,
.admin-workflow-bar button.active,
.assistant-step-card:hover,
.assistant-step-card.active,
.assistant-decision:hover {
  transform: translateY(-1px);
  border-color: rgba(240,193,104,.58);
  background: rgba(216,155,47,.1);
}
.undo-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(240,193,104,.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(216,155,47,.11), rgba(0,0,0,.24)),
    radial-gradient(circle at 98% 8%, rgba(240,193,104,.14), transparent 28%);
}
.undo-bar.empty {
  border-color: rgba(216,155,47,.16);
  background: rgba(0,0,0,.16);
}
.undo-bar strong {
  display: block;
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.undo-bar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.admin-guide {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.95), rgba(5,8,8,.98)),
    radial-gradient(circle at 95% 12%, rgba(216,155,47,.14), transparent 32%);
}
.admin-guide h3 { margin: 12px 0 8px; color: var(--gold-2); font-size: 22px; text-transform: uppercase; }
.admin-guide p { margin: 0; color: var(--muted); }
.admin-guide ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}
.admin-guide li {
  padding: 10px 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 6px;
  color: var(--text);
  background: rgba(0,0,0,.2);
  font-size: 13px;
}
.admin-assistant-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  align-items: stretch;
}
.assistant-copy,
.assistant-next-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.94), rgba(0,0,0,.28)),
    radial-gradient(circle at 96% 8%, rgba(216,155,47,.16), transparent 30%);
}
.assistant-copy h3 {
  max-width: 740px;
  margin: 12px 0 10px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.04;
  text-transform: uppercase;
}
.assistant-copy p,
.assistant-next-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.assistant-next-card {
  display: grid;
  align-content: start;
  gap: 12px;
}
.assistant-next-card h4 {
  margin: 0;
  color: var(--gold-2);
  font-size: 18px;
  text-transform: uppercase;
}
.assistant-next-card .small-button { justify-self: start; }
.assistant-step-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.assistant-step-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
}
.assistant-step-card strong {
  color: var(--gold-2);
  font-size: 14px;
  text-transform: uppercase;
}
.assistant-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.assistant-step-card small {
  align-self: end;
  justify-self: start;
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #050505;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.dashboard-grid.compact .dashboard-card { min-height: 140px; }
.assistant-list { display: grid; gap: 10px; align-content: start; }
.assistant-list h3 { margin-bottom: 4px; }
.assistant-decision {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
}
.assistant-decision strong {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #050505;
  background: var(--gold);
  font-size: 15px;
}
.assistant-decision span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.assistant-decision p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.board-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board-column { padding: 18px; min-width: 0; max-width: 100%; }
.board-column h3 { margin: 0 0 14px; color: var(--gold-2); font-size: 20px; text-transform: uppercase; }
.orders-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.orders-list {
  display: grid;
  gap: 12px;
}
.orders-list-panel,
.orders-quality-panel {
  min-width: 0;
}
.orders-quality-panel .quality-assistant {
  min-width: 0;
}
.orders-quality-panel .quality-assistant > .board-grid.two {
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr);
}
.orders-quality-panel .quality-assistant > .board-grid.two:last-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipeline-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.pipeline-board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-board.pipeline-board-compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}
.pipeline-column { padding: 12px; min-height: 380px; }
.pipeline-column h3 { margin: 0 0 12px; color: var(--gold-2); font-size: 14px; text-transform: uppercase; }
.pipeline-lane {
  min-height: auto;
}
.pipeline-lane h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.pipeline-lane h3 strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 12px;
}
.pipeline-lane-list {
  display: grid;
  gap: 8px;
}
.pipeline-compact-card {
  display: grid;
  gap: 7px;
  align-content: start;
  width: 100%;
  min-height: 142px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(15,24,24,.82), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.08), transparent 34%);
  text-align: left;
  overflow: visible;
  overflow-wrap: anywhere;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.pipeline-compact-card:hover,
.pipeline-compact-card.active {
  transform: translateY(-1px);
  border-color: rgba(240,193,104,.62);
  background:
    linear-gradient(180deg, rgba(216,155,47,.12), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.12), transparent 34%);
}
.pipeline-compact-card strong {
  color: var(--gold-2);
  font-size: 15px;
  text-transform: uppercase;
}
.pipeline-compact-card small,
.pipeline-compact-card em,
.pipeline-compact-card i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}
.pipeline-compact-card b {
  color: var(--text);
  font-size: 13px;
}
.pipeline-workbench {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.94), rgba(5,8,8,.98)),
    radial-gradient(circle at 98% 5%, rgba(216,155,47,.12), transparent 30%);
}
.panel-workbench {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.94), rgba(5,8,8,.98)),
    radial-gradient(circle at 98% 4%, rgba(216,155,47,.1), transparent 30%);
}
.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}
.workbench-grid.reverse {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
}
.workbench-stack {
  display: grid;
  gap: 12px;
}
.workbench-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.workbench-card-button {
  display: grid;
  gap: 8px;
  align-content: start;
  width: 100%;
  min-height: 134px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(15,24,24,.82), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.08), transparent 34%);
  text-align: left;
  overflow: visible;
  overflow-wrap: anywhere;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.workbench-card-button:hover,
.workbench-card-button.active {
  transform: translateY(-1px);
  border-color: rgba(240,193,104,.62);
  background:
    linear-gradient(180deg, rgba(216,155,47,.12), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.12), transparent 34%);
}
.workbench-card-button strong {
  color: var(--gold-2);
  font-size: 15px;
  text-transform: uppercase;
}
.commission-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(216,155,47,.12), rgba(0,0,0,.2)),
    rgba(9,16,16,.72);
  color: var(--text);
  overflow-wrap: anywhere;
}
.commission-note.muted {
  border-color: rgba(255,255,255,.1);
  background: rgba(0,0,0,.18);
}
.commission-note strong {
  color: var(--gold-2);
  font-size: 13px;
  text-transform: uppercase;
}
.commission-note span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}
.commission-list {
  display: grid;
  gap: 10px;
}
.commission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.84), rgba(0,0,0,.22)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.1), transparent 34%);
  min-width: 0;
}
.commission-card > strong {
  color: var(--gold-2);
  font-size: 20px;
  white-space: nowrap;
}
.commission-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}
.commission-card .mini-actions {
  grid-column: 1 / -1;
}
.price-line.commission {
  border-color: rgba(216,155,47,.34);
  background: rgba(216,155,47,.08);
}
.workbench-card-button small,
.workbench-card-button em,
.workbench-card-button span.note {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}
.panel-workbench .system-form,
.panel-workbench .board-column,
.panel-workbench .offer-preview,
.panel-workbench .request-card,
.panel-workbench .order-item {
  min-width: 0;
}
.panel-workbench .mini-actions .small-button {
  min-width: 132px;
}
.public-cms-workbench {
  gap: 18px;
}
.public-cms-summary .dashboard-card {
  min-height: 138px;
}
.public-cms-form {
  display: grid;
  gap: 18px;
}
.public-cms-toolbar {
  align-items: end;
}
.public-cms-toolbar label {
  min-width: 220px;
}
.public-cms-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 14px;
  align-items: start;
}
.public-cms-section,
.public-cms-preview {
  min-width: 0;
}
.public-cms-section .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.public-cms-wide {
  grid-column: 1 / -1;
}
.public-cms-list {
  display: grid;
  gap: 10px;
}
.public-cms-row {
  display: grid;
  grid-template-columns: minmax(104px, .28fr) minmax(150px, .42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  min-width: 0;
}
.public-cms-row .check-row {
  align-self: stretch;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(216,155,47,.06);
}
.public-cms-row input,
.public-cms-row textarea,
.public-cms-form input,
.public-cms-form textarea,
.public-cms-form select {
  font-size: 14px;
}
.public-cms-preview {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(240,193,104,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.88), rgba(0,0,0,.28)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.12), transparent 34%);
}
.public-cms-preview h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.1;
}
.public-cms-preview p {
  margin: 0;
  color: var(--muted);
}
.public-cms-preview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.public-cms-preview-stats article {
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.public-cms-preview-stats strong {
  display: block;
  color: var(--gold-2);
  font-size: 20px;
}
.public-cms-preview-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.public-cms-actions {
  justify-content: flex-end;
}
.cms-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.public-asset-list,
.public-media-section-list,
.public-media-editor-list {
  display: grid;
  gap: 12px;
}
.public-asset-editor,
.public-media-editor,
.public-media-section-editor {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.82), rgba(0,0,0,.22)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.08), transparent 34%);
}
.public-asset-editor {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.public-media-editor {
  display: grid;
  grid-template-columns: 150px 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.public-media-section-editor {
  display: grid;
  gap: 12px;
}
.public-asset-preview {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 138px;
  overflow: hidden;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.34);
}
.public-asset-preview img,
.public-asset-preview video {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.public-asset-placeholder {
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.public-asset-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.public-asset-fields h4 {
  margin: 0;
  color: var(--gold-2);
  font-size: 15px;
  text-transform: uppercase;
}
.public-asset-fields p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.public-asset-fields small,
.public-media-editor small {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(216,155,47,.06);
  font-weight: 800;
}
.media-section-toggle {
  margin-bottom: 8px;
}
.media-section {
  display: grid;
  gap: 28px;
}
.media-section[hidden] {
  display: none;
}
.media-section-heading {
  margin-bottom: 0;
}
.public-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.public-media-card {
  overflow: hidden;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.78), rgba(0,0,0,.28)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.08), transparent 34%);
}
.public-media-card img,
.public-media-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center center;
  filter: brightness(1.08) contrast(1.04) saturate(1.05);
  background: rgba(0,0,0,.4);
}
.public-media-card div {
  display: grid;
  gap: 6px;
  padding: 14px;
}
.public-media-card strong {
  color: var(--gold-2);
  font-size: 14px;
  text-transform: uppercase;
}
.public-media-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.ai-workbench .workbench-grid,
.assembly-dashboard .workbench-grid,
.assembly-schedule .workbench-grid,
.assembly-documents .workbench-grid,
.assembly-protocol .workbench-grid,
.assembly-history .workbench-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.ai-draft-panel {
  padding: 16px;
  border: 1px solid rgba(240,193,104,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.ai-draft-panel textarea,
.assembly-schedule textarea,
.assembly-documents textarea,
.assembly-protocol textarea {
  width: 100%;
  min-height: 168px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: rgba(0,0,0,.36);
  border-color: rgba(240,193,104,.22);
  resize: vertical;
}
.ai-assignment-note {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(216,155,47,.1), rgba(0,0,0,.2)),
    rgba(0,0,0,.2);
}
.ai-assignment-note p,
.ai-assignment-note small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.ai-assignment-note small {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 850;
}
.assembly-dashboard .dashboard-grid,
.assembly-documents .dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.assembly-order-button {
  min-height: 154px;
}
.assembly-order-button strong {
  letter-spacing: 0;
}
.assembly-protocol .partner-thread.partner textarea {
  display: none;
}
.pipeline-detail-card {
  margin-bottom: 0;
  padding: 18px;
}
.pipeline-detail-card > h4 {
  font-size: 22px;
  color: var(--gold-2);
}
.pipeline-detail-card > p {
  font-size: 14px;
}
.pipeline-detail-card .pipeline-assignment,
.pipeline-detail-card .split-panel,
.pipeline-detail-card .partner-thread {
  margin-top: 14px;
}
.pipeline-detail-card .pipeline-assignment {
  grid-template-columns: minmax(320px, .8fr) minmax(280px, 1.2fr);
  align-items: end;
}
.pipeline-detail-card .split-form {
  grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
  align-items: start;
}
.pipeline-detail-card .split-form > .form-grid,
.pipeline-detail-card .split-form > .mini-actions {
  grid-column: 1 / -1;
}
.pipeline-detail-card .partner-thread textarea {
  min-height: 128px;
}
.pipeline-detail-card .mini-actions .small-button {
  min-width: 132px;
}
.pipeline-card, .request-card, .access-item, .task-item, .audit-item, .report-card, .document-item, .activity-item, .comment-item {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
  min-width: 0;
  overflow-wrap: anywhere;
}
.pipeline-card.active {
  border-color: rgba(240,193,104,.74);
  box-shadow: inset 0 0 0 1px rgba(240,193,104,.22), 0 14px 34px rgba(0,0,0,.22);
  background:
    linear-gradient(180deg, rgba(216,155,47,.1), rgba(0,0,0,.22)),
    rgba(0,0,0,.26);
}
.pipeline-card h4, .request-card h4, .access-item h4, .task-item h4, .audit-item h4, .report-card h4, .document-item h4, .activity-item h4 { margin: 0 0 8px; color: var(--text); font-size: 15px; }
.pipeline-card p, .request-card p, .access-item p, .task-item p, .audit-item p, .report-card p, .document-item p, .activity-item p, .comment-item p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.translation-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
  min-width: 0;
}
.translation-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.translation-panel-head h4 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 14px;
}
.translation-original,
.translation-polish {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.translation-original strong,
.translation-polish strong {
  display: inline-block;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.translation-original p,
.translation-polish p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}
.translation-polish {
  border-color: rgba(240,193,104,.34);
  background: rgba(216,155,47,.1);
}
.translation-polish > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.translation-polish span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.translation-polish small {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.62);
}
.action-card {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.action-card:hover {
  transform: translateY(-1px);
  border-color: rgba(240,193,104,.54);
  background: linear-gradient(180deg, rgba(216,155,47,.13), rgba(0,0,0,.22));
}
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
  margin: 12px 0 16px;
}
.action-bar { align-items: center; }
.workflow-badges, .doc-flow-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.workflow-badges span, .doc-flow-line span, .queue-note {
  min-height: 28px;
  padding: 7px 9px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.22);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.doc-flow-line span.done {
  color: #d8f4df;
  border-color: rgba(76,138,98,.4);
  background: rgba(76,138,98,.15);
}
.doc-flow-line span.warn {
  color: #ffd7a6;
  border-color: rgba(216,155,47,.42);
  background: rgba(216,155,47,.14);
}
.document-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.document-flow button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  text-align: left;
}
.document-flow button:hover { border-color: rgba(240,193,104,.54); background: rgba(216,155,47,.12); }
.document-flow strong { color: var(--gold-2); font-size: 13px; }
.document-flow span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.quality-assistant { display: grid; gap: 14px; }
.quality-hero { border-color: rgba(240,193,104,.34); }
.quality-form {
  border-color: rgba(240,193,104,.32);
  background:
    linear-gradient(180deg, rgba(15,24,24,.96), rgba(5,8,8,.98)),
    radial-gradient(circle at 88% 10%, rgba(216,155,47,.12), transparent 30%);
}
.quality-mini { margin: 12px 0; }
.quality-details {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.quality-details summary {
  color: var(--gold-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.quality-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 8px;
}
.quality-step {
  min-width: 0;
  min-height: 70px;
  padding: 11px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.22);
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}
.quality-step:hover { border-color: rgba(240,193,104,.56); background: rgba(216,155,47,.12); }
.quality-step.done { border-color: rgba(76,138,98,.48); background: rgba(76,138,98,.13); }
.quality-step.blocked { border-color: rgba(184,69,50,.54); background: rgba(184,69,50,.13); }
.quality-step strong {
  display: block;
  max-width: 100%;
  color: var(--gold-2);
  font-size: 13px;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  white-space: normal;
}
.quality-step span {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.quality-timeline { display: grid; gap: 10px; }
.quality-record {
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.quality-record h4 { margin: 8px 0 6px; color: var(--text); font-size: 15px; }
.quality-record p { margin: 0; color: var(--muted); font-size: 13px; }
.quality-record small { display: block; margin-top: 8px; color: var(--quiet); font-size: 11px; }
.quality-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.quality-photo-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.26);
}
.quality-photo-grid img, .photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  color: var(--gold-2);
  background:
    linear-gradient(135deg, rgba(216,155,47,.12), rgba(0,0,0,.22)),
    radial-gradient(circle at 70% 20%, rgba(240,193,104,.18), transparent 34%);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.quality-photo-grid figcaption {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.empty-note { color: var(--muted); font-size: 13px; }
.ai-advice { border-color: rgba(240,193,104,.34); background: linear-gradient(180deg, rgba(216,155,47,.12), rgba(0,0,0,.24)); }
.distributor-request.active { border-color: rgba(240,193,104,.68); background: rgba(216,155,47,.1); }
.reply-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(216,155,47,.12), rgba(0,0,0,.18));
}
.reply-box strong { display: block; margin-bottom: 6px; color: var(--gold-2); font-size: 12px; text-transform: uppercase; }
.reply-box p { margin: 0; color: var(--text); }
.ai-brief-box p {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ai-brief-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.ai-brief-modules span {
  padding: 6px 8px;
  border: 1px solid rgba(240,193,104,.28);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(0,0,0,.18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.partner-thread {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.74), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.1), transparent 32%);
}
.partner-thread .column-head { margin-bottom: 0; }
.partner-thread h3 {
  margin: 0 0 4px;
  color: var(--gold-2);
  font-size: 14px;
  text-transform: uppercase;
}
.partner-thread p { margin: 0; color: var(--muted); font-size: 12px; }
.partner-thread textarea { min-height: 94px; }
.document-item {
  background:
    linear-gradient(180deg, rgba(15,24,24,.9), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.1), transparent 34%);
}
.workflow-center {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.workflow-control-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(240,193,104,.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15,24,24,.96), rgba(0,0,0,.78)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.12), transparent 32%);
}
.workflow-control-bar label,
.compact-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.workflow-control-bar label span,
.compact-form label span {
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.workflow-control-bar select {
  width: 100%;
  min-height: 42px;
}
.workflow-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(76,138,98,.42);
  border-radius: 8px;
  color: #d8ffe2;
  background: rgba(76,138,98,.12);
}
.workflow-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.workflow-metrics article,
.workflow-kanban article,
.workflow-panel,
.workflow-card,
.workflow-standards article,
.workflow-compare article,
.workflow-deadlines article,
.workflow-responsibility article,
.scope-table article {
  min-width: 0;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.74), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.09), transparent 34%);
  overflow-wrap: anywhere;
}
.workflow-metrics article {
  padding: 14px;
}
.workflow-metrics strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
  line-height: 1;
}
.workflow-metrics span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.workflow-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.workflow-kanban article {
  display: grid;
  gap: 7px;
  padding: 12px;
}
.workflow-kanban strong,
.workflow-standards strong {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.workflow-kanban h4,
.workflow-card h4,
.workflow-standards h4,
.workflow-compare h4,
.scope-table h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}
.workflow-kanban span {
  display: block;
  padding: 7px 8px;
  border: 1px solid rgba(216,155,47,.12);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 11px;
  font-weight: 800;
}
.workflow-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.workflow-panel {
  padding: 14px;
}
.workflow-panel h3 {
  margin-top: 0;
}
.workflow-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.workflow-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.workflow-checklist,
.workflow-doc-picker,
.workflow-list,
.workflow-deadlines,
.workflow-responsibility,
.workflow-table,
.workflow-compare,
.workflow-standards {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.workflow-checklist {
  margin: 12px 0;
}
.workflow-checklist label,
.workflow-doc-picker label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(216,155,47,.14);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 800;
}
.workflow-checklist label.done,
.workflow-doc-picker label:has(input:checked) {
  border-color: rgba(76,138,98,.34);
  color: #dff6e5;
  background: rgba(76,138,98,.11);
}
.workflow-card,
.workflow-compare article,
.scope-table article {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.workflow-card p,
.workflow-compare p,
.workflow-standards p,
.scope-table p,
.workflow-responsibility p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.workflow-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.workflow-row-meta span,
.workflow-deadlines small,
.workflow-card small,
.scope-table small,
.workflow-compare small {
  display: inline-block;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
}
.workflow-deadlines article,
.workflow-responsibility article,
.workflow-standards article {
  display: grid;
  gap: 6px;
  padding: 11px;
}
.workflow-deadlines strong,
.workflow-responsibility strong {
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.workflow-deadlines span,
.workflow-responsibility span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.workflow-standards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.workflow-compare {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.compact-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.compact-form input,
.compact-form select,
.compact-form textarea,
.workflow-control-bar select {
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 14px;
  outline: 0;
}
.compact-form input,
.compact-form select {
  min-height: 40px;
}
.compact-form textarea {
  min-height: 86px;
}
.file-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.file-chip {
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(216,155,47,.08);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.file-chip.muted { display: inline-block; margin-top: 8px; color: var(--quiet); background: rgba(255,255,255,.04); }
.document-download-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}
.document-download-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  min-width: 0;
}
.document-download-card strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.document-download-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  justify-content: flex-start;
}
.document-actions .small-button {
  min-width: 92px;
  flex: 0 1 auto;
}
.comment-list { display: grid; gap: 8px; margin: 10px 0; }
.comment-list.compact { gap: 6px; }
.comment-item { padding: 10px; margin-bottom: 0; background: rgba(255,255,255,.035); }
.comment-item strong { display: block; color: var(--gold-2); font-size: 12px; text-transform: uppercase; }
.comment-item small, .activity-item small { display: block; margin-top: 7px; color: var(--quiet); font-size: 11px; }
.activity-item.reminder { border-color: rgba(240,193,104,.32); background: linear-gradient(180deg, rgba(216,155,47,.1), rgba(0,0,0,.22)); }
.order-item {
  min-width: 0;
  overflow-wrap: anywhere;
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.78), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.1), transparent 34%);
}
.order-item h3 { margin: 8px 0 8px; color: var(--gold-2); font-size: 20px; text-transform: uppercase; }
.order-item p { color: var(--muted); font-size: 13px; }
.order-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}
.order-card-head h3 { margin: 0; }
.order-card-head p { margin: 4px 0 0; }
.order-value {
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}
.order-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.order-meta-grid span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(216,155,47,.14);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.order-item label textarea {
  min-height: 96px;
}
.assembly-mode-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(216,155,47,.08), rgba(0,0,0,.2));
}
.assembly-mode-panel strong {
  display: block;
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.assembly-mode-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.assembly-mode-panel label { margin: 0; }
.assembly-ai-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(240,193,104,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(216,155,47,.09), rgba(0,0,0,.2)),
    radial-gradient(circle at 100% 0, rgba(76,138,98,.13), transparent 36%);
}
.assembly-ai-card h4 {
  margin: 6px 0 0;
  color: var(--gold-2);
  font-size: 14px;
  text-transform: uppercase;
}
.assembly-ai-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.assembly-ai-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
}
.assembly-ai-metrics span {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.14);
  border-radius: 7px;
  background: rgba(0,0,0,.2);
}
.assembly-ai-metrics strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.assembly-ai-metrics small {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.order-item .quality-photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 180px));
}
.order-item .quality-photo-grid img,
.order-item .photo-placeholder {
  max-height: 128px;
}
.version-list {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.version-list span {
  padding: 8px 10px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.task-item.done { opacity: .68; }
.task-item.done h4 { text-decoration: line-through; text-decoration-color: rgba(216,155,47,.8); }
.mini-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pipeline-assignment {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.15);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.pipeline-assignment strong { color: var(--gold-2); }
.split-panel {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.18)),
    radial-gradient(circle at 0 0, rgba(216,155,47,.12), transparent 34%);
}
.split-panel h3 {
  margin: 0 0 4px;
  color: var(--gold-2);
  font-size: 14px;
  text-transform: uppercase;
}
.split-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.split-list {
  display: grid;
  gap: 10px;
}
.split-part-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.22);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  min-width: 0;
}
.split-part-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.split-part-head h4 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.split-part-head strong {
  flex: 0 0 auto;
  color: var(--gold-2);
  font-size: 13px;
  white-space: nowrap;
}
.split-part-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.split-part-meta span {
  padding: 6px 8px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 11px;
  font-weight: 800;
}
.split-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(240,193,104,.3);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.partner-access-card, .offer-builder, .audit-card { padding: 18px; }
.offer-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.offer-presets button {
  min-height: 38px;
  border: 1px solid rgba(216,155,47,.3);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.offer-presets button:hover { color: #050505; background: var(--gold); }
.partner-access-card { display: grid; gap: 16px; }
.partner-access-layout { display: grid; grid-template-columns: minmax(260px, .58fr) minmax(520px, 1.42fr); gap: 16px; align-items: start; }
.access-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.access-workflow article,
.access-secret,
.company-profile-card {
  min-width: 0;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.access-workflow article {
  padding: 14px;
}
.access-workflow strong {
  display: block;
  color: var(--gold-2);
  font-size: 13px;
}
.access-workflow span {
  display: block;
  margin: 7px 0 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.access-workflow p,
.access-secret p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}
.access-intro {
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.access-intro h3 { margin: 0 0 10px; color: var(--gold-2); font-size: 22px; text-transform: uppercase; }
.access-intro p { margin: 0; color: var(--muted); }
.access-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 8px; margin-top: 16px; }
.access-kpis article { padding: 12px; border: 1px solid rgba(216,155,47,.16); border-radius: 8px; background: rgba(0,0,0,.22); }
.access-kpis strong { display: block; color: var(--gold-2); font-size: 24px; }
.access-kpis span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.access-secret {
  margin-top: 12px;
  padding: 12px;
}
.access-secret strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.access-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; max-height: none; overflow: visible; }
.access-item { cursor: pointer; min-width: 0; overflow: hidden; }
.access-item p,
.access-item h4 { overflow-wrap: anywhere; }
.access-item strong { overflow-wrap: anywhere; }
.access-item.active { border-color: rgba(240,193,104,.7); background: rgba(216,155,47,.1); }
.access-item:hover { border-color: rgba(240,193,104,.5); background: rgba(216,155,47,.08); }
.access-item .small-button { position: relative; z-index: 1; }
.access-filter-note {
  margin: 12px 0 0;
  color: var(--quiet);
  font-size: 12px;
}
.company-profile-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.company-profile-card.partner {
  background:
    linear-gradient(180deg, rgba(12,20,20,.94), rgba(4,6,6,.98)),
    radial-gradient(circle at 100% 0%, rgba(216,155,47,.1), transparent 34%);
}
.company-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.company-profile-head h3 {
  margin: 10px 0 4px;
  color: var(--gold-2);
  font-size: 22px;
  line-height: 1.08;
  text-transform: uppercase;
}
.company-profile-head p {
  margin: 0;
  color: var(--muted);
}
.company-profile-head > strong {
  flex: 0 0 auto;
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.company-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.company-profile-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.14);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.company-profile-grid span {
  display: block;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.company-profile-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.offer-preview { border: 1px solid rgba(216,155,47,.22); border-radius: 8px; padding: 18px; background: rgba(0,0,0,.24); }
.offer-preview h4 { margin: 0 0 10px; color: var(--gold-2); font-size: 20px; }
.investor-story-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(9,14,14,.96), rgba(5,6,6,.98)),
    radial-gradient(circle at 92% 8%, rgba(216,155,47,.18), transparent 30%);
  overflow: hidden;
}
.investor-story-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.investor-story-head h3 {
  margin: 8px 0 6px;
  color: var(--gold-2);
  font-size: 22px;
  line-height: 1.08;
  text-transform: uppercase;
}
.investor-story-head p {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
}
.investor-story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.investor-story-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.investor-story-grid article.wide {
  grid-column: span 2;
}
.investor-story-grid strong {
  display: inline-block;
  color: var(--gold-2);
  font-size: 12px;
}
.investor-story-grid h4 {
  margin: 7px 0 8px;
  color: var(--text);
  font-size: 14px;
  text-transform: uppercase;
}
.investor-story-grid p,
.investor-story-grid small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.investor-story-grid p {
  margin: 0 0 10px;
}
.investor-story-grid small {
  display: block;
}
.investor-story-grid pre {
  max-height: 220px;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0,0,0,.26);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
}
.investor-response-list {
  display: grid;
  gap: 8px;
}
.investor-response-list div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.14);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.investor-response-list span,
.investor-response-list b,
.investor-response-list small {
  display: block;
  overflow-wrap: anywhere;
}
.investor-response-list span {
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.investor-response-list b {
  margin-top: 4px;
  color: var(--text);
}
.investor-response-list small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.42;
}
@media (max-width: 1180px) {
  .investor-story-head,
  .investor-story-grid {
    grid-template-columns: 1fr;
  }
  .investor-story-grid article.wide {
    grid-column: auto;
  }
}
.inquiry-package-generator {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid rgba(216,155,47,.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12,20,20,.96), rgba(4,7,7,.98)),
    radial-gradient(circle at 90% 10%, rgba(216,155,47,.18), transparent 32%);
  min-width: 0;
  overflow: hidden;
}
.inquiry-package-generator h3 {
  margin: 10px 0 8px;
  color: var(--gold-2);
  font-size: 22px;
  text-transform: uppercase;
}
.inquiry-package-generator p {
  margin: 0;
  color: var(--muted);
}
.package-generator-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.package-generator-form label,
.package-generator-form input,
.package-generator-form select,
.package-generator-form textarea,
.package-generator-form .button,
.inquiry-package-generator > div {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.package-generator-form .button {
  width: 100%;
}
.inquiry-package-generator h3,
.inquiry-package-generator p,
.package-generator-stats span {
  overflow-wrap: anywhere;
}
.package-generator-form .wide-field,
.package-generator-form .button,
.package-generator-form .form-status,
.package-generator-stats {
  grid-column: 1 / -1;
}
.package-generator-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.package-generator-stats span {
  padding: 7px 10px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.22);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.transfer-helper small,
.source-files-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}
.package-source-files {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.source-files-head strong {
  display: block;
  color: var(--gold-2);
  text-transform: uppercase;
}
.source-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.source-file-card.ceig-only {
  border-color: rgba(216,155,47,.24);
  background: rgba(216,155,47,.06);
}
.source-file-card strong,
.source-file-card small {
  display: block;
  overflow-wrap: anywhere;
}
.source-file-card strong {
  margin-top: 6px;
  color: var(--text);
}
.source-file-card small {
  margin-top: 4px;
  color: var(--muted);
}
.source-file-card .document-actions {
  justify-content: flex-end;
}

.package-mail-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(74,144,226,.28);
  border-radius: 8px;
  background: rgba(74,144,226,.08);
}
.package-mail-preview article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.package-mail-preview h4 {
  margin: 8px 0 10px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.package-mail-preview pre {
  margin: 0;
  color: var(--muted);
  font-family: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.package-gallery-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.package-main-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(74,144,226,.34);
  border-radius: 8px;
  background: rgba(74,144,226,.1);
}

.package-main-link.expired {
  border-color: rgba(220,77,77,.34);
  background: rgba(80,12,12,.18);
}

.package-main-link strong,
.package-main-link small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.package-main-link strong {
  margin-top: 6px;
  color: var(--text);
}

.package-main-link small {
  margin-top: 4px;
  color: var(--muted);
}

.package-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  min-width: 0;
}

.package-gallery-tile {
  display: grid;
  grid-template-rows: 118px auto auto;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.package-gallery-tile img,
.package-file-icon {
  width: 100%;
  height: 118px;
  border-radius: 6px;
  background: rgba(0,0,0,.24);
}

.package-gallery-tile img {
  display: block;
  object-fit: cover;
}

.package-file-icon {
  display: grid;
  place-items: center;
  color: var(--gold-2);
  border: 1px dashed rgba(216,155,47,.28);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.package-gallery-tile strong,
.package-gallery-tile small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.package-gallery-tile strong {
  color: var(--text);
  font-size: 13px;
}

.package-gallery-tile small {
  color: var(--muted);
  font-size: 11px;
}

.package-gallery-tile .document-actions {
  justify-content: stretch;
}

.package-gallery-tile .document-actions .small-button {
  flex: 1 1 auto;
}

@media (max-width: 760px) {
  .package-main-link {
    grid-template-columns: 1fr;
  }
}
.status-pill.warning {
  border-color: rgba(240,193,104,.42);
  color: #1b1406;
  background: linear-gradient(180deg, #f0c168, #d89b2f);
}

.status-pill.ok {
  border-color: rgba(82,174,116,.45);
  color: #d9f4df;
  background: rgba(82,174,116,.16);
}
.price-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.price-line strong { color: var(--gold-2); }
.price-line.total { margin-top: 4px; border-bottom-color: rgba(216,155,47,.44); font-size: 16px; }
.price-line.total strong { font-size: 20px; }
.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.offer-meta span {
  padding: 7px 9px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.22);
  font-size: 11px;
  font-weight: 800;
}
.market-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.market-admin-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15,24,24,.94), rgba(6,9,9,.98));
}
.market-admin-card h3 { margin: 0; color: var(--gold-2); font-size: 20px; text-transform: uppercase; }
.market-admin-card p { margin: 0; color: var(--muted); }

.factory-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.factory-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  text-align: center;
  overflow-wrap: anywhere;
}
.factory-card h4 { margin: 0 0 8px; color: var(--gold-2); font-size: 22px; line-height: 1.05; }
.factory-card p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.factory-command { display: grid; gap: 14px; }
.factory-hero-panel {
  padding: 22px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10,16,16,.97), rgba(3,5,5,.98)),
    radial-gradient(circle at 88% 12%, rgba(216,155,47,.18), transparent 34%);
}
.factory-hero-panel h3 { max-width: 760px; margin: 12px 0 10px; color: var(--gold-2); font-size: 28px; line-height: 1.04; text-transform: uppercase; }
.factory-hero-panel p { max-width: 880px; margin: 0; color: var(--muted); }
.factory-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.factory-command-strip span {
  min-height: 48px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.22);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.factory-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.factory-card-head strong {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 7px 8px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(216,155,47,.08);
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
}
.factory-progress {
  height: 8px;
  margin: 12px 0;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.factory-progress span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.factory-checklist, .factory-meta-row, .factory-check-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.factory-checklist span, .factory-meta-row span, .factory-check-panel span {
  min-height: 28px;
  padding: 7px 9px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.2);
  font-size: 11px;
  font-weight: 800;
}
.factory-checklist span.done {
  color: #cfead6;
  border-color: rgba(76,138,98,.38);
  background: rgba(76,138,98,.14);
}
.factory-meta-row { margin-top: 10px; }
.factory-worklist {
  display: grid;
  gap: 10px;
}
.factory-worklist article, .factory-worklist button {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.factory-worklist button {
  width: 100%;
  color: inherit;
  text-align: left;
}
.factory-worklist button:hover {
  border-color: rgba(240,193,104,.54);
  background: rgba(216,155,47,.12);
}
.factory-worklist strong { color: var(--gold-2); font-size: 13px; }
.factory-worklist span { color: var(--muted); font-size: 13px; }
.factory-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.factory-offer-layout .system-form {
  border-color: rgba(240,193,104,.32);
  background:
    linear-gradient(180deg, rgba(15,24,24,.95), rgba(5,8,8,.98)),
    radial-gradient(circle at 90% 6%, rgba(216,155,47,.12), transparent 30%);
}
.factory-check-panel {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.factory-check-panel.vertical {
  display: grid;
  grid-template-columns: 1fr;
}
.checkline {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(216,155,47,.15);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0,0,0,.16);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
}
.checkline input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--gold);
}
.checkline:has(input:checked) {
  color: #d8f4df;
  border-color: rgba(76,138,98,.38);
  background: rgba(76,138,98,.13);
}
.checkline:has(input:checked) span {
  text-decoration: line-through;
  text-decoration-color: rgba(216,155,47,.72);
}
.checkline span::before { content: none; }
.factory-check-panel span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.factory-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.factory-scope-card { border-color: rgba(216,155,47,.24); }
.factory-requests-workbench > .workbench-grid {
  grid-template-columns: minmax(320px, .95fr) minmax(0, 1.05fr);
}
.factory-requests-workbench .board-column,
.factory-scope-card,
.factory-scope-card .document-download-list {
  min-width: 0;
}
.factory-scope-card .document-download-list {
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}
.factory-knowledge-shell {
  display: grid;
  gap: 14px;
}
.knowledge-toolbar {
  display: grid;
  gap: 12px;
}
.knowledge-toolbar h3,
.knowledge-detail h3 { margin-bottom: 8px; }
.knowledge-toolbar p,
.knowledge-detail p { color: var(--muted); }
.knowledge-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.knowledge-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.knowledge-categories button {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.22);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.knowledge-categories button.active,
.knowledge-categories button:hover {
  color: #050505;
  border-color: transparent;
  background: var(--gold);
}
.knowledge-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.factory-knowledge-grid .material-card,
.knowledge-card {
  min-height: 188px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.92), rgba(0,0,0,.28)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.1), transparent 32%);
}
.knowledge-card {
  width: 100%;
  min-width: 0;
  color: inherit;
  text-align: left;
}
.knowledge-card.active {
  border-color: rgba(240,193,104,.72);
  background:
    linear-gradient(180deg, rgba(216,155,47,.16), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(240,193,104,.16), transparent 34%);
}
.knowledge-card small {
  display: block;
  margin-top: 12px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.knowledge-detail {
  display: grid;
  gap: 12px;
}
.knowledge-detail .ai-advice {
  padding: 13px;
  border: 1px solid rgba(240,193,104,.28);
  border-radius: 8px;
}
.knowledge-detail .ai-advice strong,
.factory-check-panel h4 {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 12px;
  text-transform: uppercase;
}
.knowledge-message textarea {
  min-height: 160px;
  background: rgba(0,0,0,.48);
}
.column-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.column-head h3 { margin-bottom: 6px; }
.column-head p { margin: 0; color: var(--muted); font-size: 13px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.calendar-legend span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.22);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.calendar-legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.calendar-legend .reserved::before { background: var(--blue); }
.calendar-legend .blocked::before { background: var(--red); }
.calendar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px; }
.calendar-day {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 70px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0,0,0,.24);
  text-align: left;
  overflow-wrap: anywhere;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.calendar-day:hover { transform: translateY(-1px); border-color: rgba(240,193,104,.58); }
.calendar-day strong { color: var(--text); font-size: 13px; }
.calendar-day span, .calendar-day small { font-size: 10px; font-weight: 900; text-transform: uppercase; }
.calendar-day.open { background: linear-gradient(180deg, rgba(76,138,98,.24), rgba(0,0,0,.28)); }
.calendar-day.reserved { background: linear-gradient(180deg, rgba(92,116,133,.3), rgba(0,0,0,.28)); }
.calendar-day.blocked { background: linear-gradient(180deg, rgba(157,77,67,.34), rgba(0,0,0,.28)); }
.calendar-legend.assembly .available::before { background: var(--green); }
.calendar-legend.assembly .ceig-order::before { background: var(--gold); }
.calendar-legend.assembly .reservation::before { background: var(--blue); }
.calendar-legend.assembly .own-project::before { background: #8b7a5d; }
.calendar-legend.assembly .off::before { background: var(--red); }
.calendar-day.available { background: linear-gradient(180deg, rgba(76,138,98,.22), rgba(0,0,0,.28)); }
.calendar-day.ceig-order { background: linear-gradient(180deg, rgba(216,155,47,.28), rgba(0,0,0,.28)); }
.calendar-day.reservation { background: linear-gradient(180deg, rgba(92,116,133,.32), rgba(0,0,0,.28)); }
.calendar-day.own-project { background: linear-gradient(180deg, rgba(139,122,93,.34), rgba(0,0,0,.28)); }
.calendar-day.off { background: linear-gradient(180deg, rgba(157,77,67,.36), rgba(0,0,0,.28)); }
.calendar-day.selected {
  border-color: rgba(240,193,104,.9);
  box-shadow: inset 0 0 0 1px rgba(240,193,104,.34), 0 10px 24px rgba(0,0,0,.22);
}
.calendar-day.pending-confirmation {
  border-color: rgba(240,193,104,.78);
  box-shadow: inset 0 0 0 1px rgba(240,193,104,.24);
}
.calendar-day.pending-confirmation small {
  color: var(--gold-2);
}
.selected-day { border-color: rgba(240,193,104,.48); }
.assembly-calendar-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.72), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.1), transparent 32%);
}
.assembly-calendar-panel .calendar-grid { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.assembly-calendar-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.assembly-calendar-summary .factory-card {
  min-height: 86px;
  padding: 12px;
}
.assembly-calendar-summary .factory-card h4 { font-size: 24px; }
.selected-calendar-day {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.selected-calendar-day h3 {
  margin: 0;
  color: var(--gold-2);
  font-size: 14px;
  text-transform: uppercase;
}
.calendar-entry-card { margin: 0; }
.calendar-log-card.pending {
  border-color: rgba(240,193,104,.42);
  background: linear-gradient(180deg, rgba(216,155,47,.08), rgba(0,0,0,.22));
}
.agent-tier-panel {
  margin-bottom: 16px;
}
.tier-row {
  margin: 0;
}
.agent-offer-flow-card {
  display: grid;
  gap: 12px;
}
.agent-offer-flow-card .column-head strong {
  color: var(--gold-2);
  font-size: 18px;
  text-align: right;
}
.end-to-end-flow-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.end-to-end-flow-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.26);
  border-radius: 8px;
  background: rgba(9,14,13,.42);
  min-width: 0;
  overflow-wrap: anywhere;
}
.end-to-end-flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.end-to-end-flow-head h3 {
  margin: 8px 0 6px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}
.end-to-end-flow-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.end-to-end-flow-head strong {
  color: var(--gold-2);
  font-size: 22px;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}
.end-to-end-flow-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.end-to-end-flow-steps article,
.end-to-end-flow-grid section {
  min-width: 0;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  overflow-wrap: anywhere;
}
.end-to-end-flow-steps article {
  display: grid;
  gap: 6px;
  padding: 10px;
  min-height: 132px;
}
.end-to-end-flow-steps article.done {
  border-color: rgba(76,138,98,.42);
  background: rgba(76,138,98,.12);
}
.end-to-end-flow-steps span,
.flow-evidence-list span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(240,193,104,.12);
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.end-to-end-flow-steps strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.end-to-end-flow-steps h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.22;
}
.end-to-end-flow-steps p,
.end-to-end-flow-grid p,
.end-to-end-flow-grid small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.end-to-end-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.end-to-end-flow-grid section {
  display: grid;
  gap: 8px;
  padding: 12px;
  align-content: start;
}
.end-to-end-flow-grid h4 {
  margin: 0;
  color: var(--gold-2);
  font-size: 13px;
  text-transform: uppercase;
}
.flow-evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.flow-evidence-list span {
  max-width: 100%;
  text-transform: none;
  color: var(--text);
  background: rgba(255,255,255,.055);
}
.document-chip-box {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.assembly-analytics-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.assembly-quote-card .order-meta-grid {
  margin: 10px 0;
}
.component-template-grid, .component-stage-list, .toolroom-grid {
  display: grid;
  gap: 10px;
}
.component-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.component-template, .component-stage {
  width: 100%;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.component-template {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 13px;
}
.component-template:hover, .component-stage:hover, .component-stage.active {
  transform: translateY(-1px);
  border-color: rgba(240,193,104,.64);
  background: rgba(216,155,47,.12);
}
.component-template strong, .component-stage strong { color: var(--gold-2); font-size: 13px; text-transform: uppercase; }
.component-template span, .component-stage small { color: var(--muted); font-size: 12px; }
.component-stage {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 5px 12px;
  min-height: 88px;
  padding: 13px;
}
.component-stage span {
  grid-row: 1 / span 2;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}
.component-stage small { grid-column: 2; }
.stage-detail ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.toolroom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.component-catalog .material-card { min-height: 210px; }

.contact-section { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.site-footer {
  width: min(calc(100% - 72px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--gold-2);
}

@media (max-width: 1320px) {
  .end-to-end-flow-steps,
  .end-to-end-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-login { position: static; }
  .workbench-grid,
  .security-workbench .workbench-grid,
  .public-cms-grid,
  .public-asset-editor,
  .public-media-editor,
  .control-grid,
  .chat-workbench,
  .admin-partner-chat,
  .ai-workbench .workbench-grid,
  .assembly-dashboard .workbench-grid,
  .assembly-schedule .workbench-grid,
  .assembly-documents .workbench-grid,
  .assembly-protocol .workbench-grid,
  .assembly-history .workbench-grid,
  .workbench-grid.reverse,
  .workflow-main-grid,
  .workflow-control-bar { grid-template-columns: 1fr; }
  .security-workbench,
  .security-workbench > *,
  .security-workbench .system-form,
  .security-workbench .board-column {
    min-width: 0;
    max-width: 100%;
  }
  .pipeline-board.pipeline-board-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }
}

@media (max-width: 1180px) {
  .site-header { grid-template-columns: 220px 1fr auto; }
  .nav-toggle { display: block; grid-column: 3; grid-row: 1; }
  .primary-nav {
    position: fixed;
    inset: 76px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(4, 6, 6, .98);
  }
  .primary-nav[data-open="true"] { display: flex; }
  .primary-nav a { padding: 14px; border-bottom: 1px solid var(--line-soft); }
  #capabilities.split-section,
  .hero-grid, .sector-workspace, .markets-layout, .split-section, .portal-grid, .contact-section, .factory-partner-section { grid-template-columns: 1fr; }
  .signal-strip, .ops-grid, .capability-list, .market-list, .market-cluster-grid, .sector-proof-strip, .dashboard-grid, .crm-grid, .report-grid, .material-grid, .board-grid, .factory-summary, .assembly-calendar-summary, .partner-access-layout, .access-list, .access-workflow, .company-profile-grid, .market-admin-grid, .factory-command-strip, .factory-readiness-grid, .document-flow, .quality-step-grid, .knowledge-list, .assistant-step-grid, .admin-quick-ops, .admin-simple-ops-head, .admin-simple-ops-actions, .admin-workflow-bar, .orders-workspace, .workflow-metrics, .workflow-kanban, .workflow-standards, .public-cms-row, .public-cms-preview-stats, .public-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factory-partner-points { grid-template-columns: 1fr; }
  .market-route-card { grid-template-columns: 1fr; }
  .orders-workspace,
  .orders-quality-panel .quality-assistant > .board-grid.two { grid-template-columns: 1fr; }
  .assembly-dashboard .dashboard-grid,
  .assembly-documents .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-assistant-hero { grid-template-columns: 1fr; }
  .pipeline-board,
  .pipeline-board.pipeline-board-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-x: visible; }
  .pipeline-detail-card .pipeline-assignment,
  .pipeline-detail-card .split-form { grid-template-columns: 1fr; }
  .workbench-grid,
  .public-cms-grid,
  .public-asset-editor,
  .public-media-editor,
  .ai-workbench .workbench-grid,
  .assembly-dashboard .workbench-grid,
  .assembly-schedule .workbench-grid,
  .assembly-documents .workbench-grid,
  .assembly-protocol .workbench-grid,
  .assembly-history .workbench-grid,
  .workbench-grid.reverse { grid-template-columns: 1fr; }
  .inquiry-panel, .portal-login { position: static; }
  .portal-topbar,
  .presence-strip,
  .chat-workbench,
  .admin-partner-chat,
  .tour-layout { grid-template-columns: 1fr; }
  .portal-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .end-to-end-flow-head,
  .end-to-end-flow-steps,
  .end-to-end-flow-grid {
    grid-template-columns: 1fr;
  }
  .end-to-end-flow-head strong {
    text-align: left;
    white-space: normal;
  }
  html { scroll-padding-top: 146px; }
  .site-header { grid-template-columns: 1fr auto; min-height: 68px; padding: 10px 14px; }
  .brand img { max-width: 190px; }
  .header-actions { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; }
  .language-switcher { overflow-x: auto; max-width: 100%; }
  .primary-nav { inset: 118px 10px auto; }
  .hero-grid, .section, .site-footer, .signal-strip { width: calc(100% - 32px); }
  .hero-grid { min-height: auto; padding: 34px 0; }
  .hero-media { grid-template-columns: 1fr; height: auto; }
  .hero-media img { height: 260px; }
  .signal-strip, .ops-grid, .capability-list, .market-list, .market-map-caption, .market-cluster-grid, .market-route-card, .market-route-steps, .sector-operating-layer, .sector-process-grid, .sector-proof-strip, .dashboard-grid, .crm-grid, .report-grid, .material-grid, .board-grid, .factory-summary, .assembly-calendar-summary, .partner-access-layout, .access-list, .access-workflow, .company-profile-grid, .pipeline-head, .admin-guide, .market-admin-grid, .sector-details, .form-grid, .component-template-grid, .toolroom-grid, .factory-command-strip, .factory-readiness-grid, .document-flow, .quality-step-grid, .knowledge-list, .knowledge-search, .assistant-step-grid, .admin-quick-ops, .admin-simple-ops-head, .admin-simple-ops-actions, .admin-workflow-bar, .orders-workspace, .order-meta-grid, .panel-search, .panel-search-form, .panel-search-result, .workflow-metrics, .workflow-kanban, .workflow-main-grid, .workflow-control-bar, .workflow-standards, .public-cms-row, .public-cms-preview-stats, .public-media-grid, .account-summary, .control-grid, .presence-strip, .chat-workbench, .admin-partner-chat, .admin-chat-assignment { grid-template-columns: 1fr; }
  .public-cms-section .form-grid { grid-template-columns: 1fr; }
  .tour-overlay { padding: 10px; }
  .tour-modal { max-height: calc(100vh - 20px); }
  .tour-head,
  .tour-controls { flex-direction: column; align-items: stretch; }
  .tour-exit-button { width: 100%; }
  .tour-entry-note { grid-template-columns: 1fr; margin: 0 12px; }
  .tour-entry-actions { justify-content: stretch; }
  .tour-entry-actions .small-button { width: 100%; }
  .tour-disable-button { margin-left: 0; }
  .tour-layout { padding: 12px; }
  .tour-stage { min-height: 130px; padding: 10px; }
  .tour-flow { grid-template-columns: 1fr; padding: 14px; }
  .tour-progress { grid-template-columns: 1fr; }
  .portal-topbar { grid-template-columns: 1fr; }
  .assembly-dashboard .dashboard-grid,
  .assembly-documents .dashboard-grid { grid-template-columns: 1fr; }
  .company-profile-head { flex-direction: column; }
  .panel-search-result strong,
  .panel-search-result small { white-space: normal; }
  .board-grid.two, .board-grid.four, .quality-assistant .board-grid.two { grid-template-columns: 1fr; }
  .assistant-copy h3 { font-size: 25px; }
  .assistant-actions .small-button,
  .assistant-next-card .small-button { width: 100%; }
  .pipeline-board,
  .pipeline-board.pipeline-board-compact { grid-template-columns: 1fr; }
.document-download-card { grid-template-columns: 1fr; align-items: start; }
  .document-actions { justify-content: flex-start; }
  .workbench-list { grid-template-columns: 1fr; }
  .commission-note {
    align-items: flex-start;
    flex-direction: column;
  }
  .commission-note span { text-align: left; }
  .commission-card { grid-template-columns: 1fr; }
  .factory-hero-panel h3 { font-size: 22px; }
  .factory-worklist article { grid-template-columns: 1fr; }
  .signal-strip article { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .section { padding: 42px 0; }
  .sector-hero { height: 300px; min-height: 300px; }
  .sector-hero-upholstery img {
    object-position: 70% 78%;
    transform: scale(1.1);
    transform-origin: 70% 78%;
  }
  .sector-tabs, .role-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-access-list { grid-template-columns: 1fr; }
  .portal-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .presence-list { justify-content: flex-start; }
  .presence-strip small { grid-column: 1 / -1; }
  .chat-message { width: 100%; }
  .chat-message > div { flex-direction: column; align-items: flex-start; }
  .session-row { grid-template-columns: 1fr; }
  .button { width: 100%; }
  .header-actions .button { width: auto; }
  .split-part-head { flex-direction: column; }
  .split-part-head strong { white-space: normal; }
  .site-footer { grid-template-columns: 1fr; }
}

/* Final QA hardening: prevent panel clipping after deployment additions */
.small-button,
.button {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.check-row,
.public-cms-row .check-row,
.public-media-editor,
.public-media-section-editor {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-row span,
.public-cms-row .check-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.factory-quick-actions-panel {
  grid-template-columns: 1fr;
}

.factory-action-buttons {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.factory-action-buttons .small-button {
  width: 100%;
  min-height: 46px;
}

.factory-requests-workbench,
.factory-requests-workbench .workbench-grid,
.factory-requests-workbench .board-column,
.factory-scope-card,
.translation-panel {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .column-head {
    flex-direction: column;
    align-items: stretch;
  }

  .column-head .small-button {
    width: 100%;
  }

  .offer-matrix-table {
    overflow-x: visible;
  }

  .offer-matrix-table .matrix-head {
    display: none;
  }

  .offer-matrix-table article {
    grid-template-columns: 1fr;
    min-width: 0;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .factory-requests-workbench {
    overflow-x: hidden;
  }

  .factory-requests-workbench > .workbench-grid,
  .factory-requests-workbench .workbench-grid {
    grid-template-columns: 1fr !important;
  }

  .factory-scope-card,
  .factory-requests-workbench .request-card,
  .factory-requests-workbench .board-column,
  .translation-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

.portal-board,
.portal-shell,
.portal-grid {
    min-width: 0;
    overflow-x: hidden;
  }
}

/* Public inquiry polish: keep sector tabs and form steps readable in the right column */
.sector-tabs {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  align-items: stretch;
}

.sector-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  line-height: 1.16;
  text-align: center;
}

.inquiry-panel .inquiry-wizard {
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 14px 0 18px;
}

.inquiry-panel .inquiry-wizard article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 12px;
  align-items: start;
  min-height: 64px;
  padding: 12px 13px;
  overflow: hidden;
}

.inquiry-panel .inquiry-wizard strong {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(240, 193, 104, .45);
  border-radius: 999px;
  background: rgba(216, 155, 47, .1);
  color: var(--gold-2);
  font-size: 11px;
  line-height: 1;
}

.inquiry-panel .inquiry-wizard span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.inquiry-panel .inquiry-wizard p {
  grid-column: 2;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.transfer-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.transfer-field textarea {
  min-height: 76px;
  resize: vertical;
}

.transfer-link-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  min-width: 0;
}

.transfer-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(240,193,104,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

.transfer-link-card.expired {
  border-color: rgba(220,77,77,.34);
  background: rgba(80,12,12,.2);
}

.transfer-link-card strong,
.transfer-link-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.transfer-link-card small {
  color: var(--quiet);
  font-size: 11px;
}

.transfer-link-card .mini-actions {
  justify-content: flex-end;
}

.document-item .transfer-link-card,
.request-card .transfer-link-card,
.order-item .transfer-link-card {
  background: rgba(0,0,0,.16);
}

.dropbox-automation-panel,
.dropbox-ops-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(74,144,226,.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10,18,24,.9), rgba(0,0,0,.28)),
    radial-gradient(circle at 100% 0, rgba(74,144,226,.16), transparent 34%);
}

.dropbox-automation-panel {
  grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr);
  align-items: end;
}

.dropbox-automation-panel h4,
.dropbox-ops-panel h3 {
  margin: 6px 0;
  color: var(--text);
}

.dropbox-automation-panel p,
.dropbox-ops-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.dropbox-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dropbox-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.dropbox-micro-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dropbox-micro-stats span {
  padding: 6px 8px;
  border: 1px solid rgba(74,144,226,.24);
  border-radius: 999px;
  color: rgba(231,241,255,.82);
  background: rgba(74,144,226,.12);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dropbox-automation-panel .form-status {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .dropbox-automation-panel {
    grid-template-columns: 1fr;
  }
}

.transfer-intake-card,
.distributor-case-meter,
.data-room-hero,
.session-company-card {
  border: 1px solid rgba(240,193,104,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18,24,23,.78), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.09), transparent 36%);
  min-width: 0;
}

.transfer-intake-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 13px;
}

.transfer-intake-card h4,
.transfer-intake-card p {
  margin: 0;
}

.distributor-command-grid,
.missing-checklist,
.data-room-grid,
.session-audit-grid,
.session-user-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.distributor-command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.distributor-command-grid article,
.missing-checklist article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.distributor-command-grid strong,
.missing-checklist span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0a0a0a;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.distributor-command-grid span,
.missing-checklist strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-weight: 800;
}

.distributor-command-grid p,
.missing-checklist small,
.session-user-row small,
.session-user-row em {
  color: var(--muted);
}

.distributor-case-meter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
}

.distributor-case-meter strong {
  grid-row: span 2;
  color: var(--gold-2);
  font-size: 26px;
}

.distributor-case-meter span {
  color: var(--text);
  font-weight: 900;
}

.distributor-case-meter small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.missing-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.missing-checklist article.done {
  border-color: rgba(76,138,98,.42);
}

.missing-checklist article.done span {
  background: var(--green);
}

.missing-checklist article.missing {
  border-color: rgba(216,155,47,.48);
  background: rgba(216,155,47,.06);
}

.data-room-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-room-grid .request-card {
  margin: 0;
}

.session-audit-grid {
  margin-bottom: 14px;
}

.session-company-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.session-company-card .column-head {
  align-items: start;
}

.session-company-card .column-head h4 {
  margin: 6px 0 0;
}

.session-company-card .status-pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.session-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(70px, .32fr) minmax(120px, .42fr);
  gap: 6px 10px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.session-user-row div,
.session-user-row > span,
.session-user-row strong,
.session-user-row small,
.session-user-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.session-user-row > span {
  display: block;
  color: var(--gold-2);
  font-weight: 900;
  white-space: normal;
}

.session-user-row em {
  grid-column: 1 / -1;
  font-style: normal;
  font-size: 11px;
}

.tour-head-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tour-language-switcher {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}

.tour-language-switcher button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.tour-language-switcher button.active,
.tour-language-switcher button:hover {
  border-color: rgba(240,193,104,.48);
  color: #0a0a0a;
  background: var(--gold);
}

.session-row div {
  min-width: 0;
}

.session-row div small {
  display: block;
  color: var(--quiet);
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .sector-tabs {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .distributor-command-grid,
  .missing-checklist,
  .data-room-grid,
  .stage6-rfq-review-grid {
    grid-template-columns: 1fr;
  }

  .portal-tabs {
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  }

  .portal-tabs button {
    font-size: 8.6px;
    padding: 7px 4px;
  }
}

@media (max-width: 760px) {
  .sector-tabs {
    grid-template-columns: 1fr;
  }

  .transfer-link-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .stage6-bulk-header,
  .stage6-rfq-review-head,
  .stage6-rfq-doc-card,
  .stage6-bulk-review-list article {
    grid-template-columns: 1fr;
  }

  .stage6-bulk-stats,
  .stage6-bulk-actions,
  .stage6-bulk-schedule,
  .stage6-rfq-review-stats,
  .stage6-send-buttons {
    grid-template-columns: 1fr;
  }

  .stage6-rfq-doc-card .document-actions,
  .stage6-bulk-review-list .small-button {
    justify-content: stretch;
    width: 100%;
  }

  .transfer-link-card .mini-actions {
    justify-content: stretch;
  }

  .portal-tabs button {
    font-size: 9px;
    padding: 8px 6px;
  }

  .tour-head-actions,
  .tour-language-switcher {
    width: 100%;
  }

  .tour-language-switcher {
    justify-content: center;
  }

  .session-user-row,
  .session-row {
    grid-template-columns: 1fr;
  }
}

/* Strategic client panel */
.client-shell .company-profile-card {
  margin-bottom: 14px;
}

.client-dashboard .workbench-grid,
.client-projects .workbench-grid,
.client-docs .workbench-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.7fr);
}

.client-project-button .note {
  min-height: 34px;
}

.client-main-card {
  min-width: 0;
}

.client-project-card {
  display: grid;
  gap: 16px;
}

.client-current-stage {
  border: 1px solid rgba(199, 160, 89, 0.28);
  background: linear-gradient(135deg, rgba(199, 160, 89, 0.14), rgba(255, 255, 255, 0.035));
  border-radius: 8px;
  padding: 16px;
}

.client-current-stage strong {
  display: block;
  margin: 8px 0 6px;
  color: #fff;
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
}

.client-current-stage p {
  margin: 0;
  color: var(--muted);
}

.client-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.client-steps article {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  padding: 12px;
}

.client-steps article.active {
  border-color: rgba(199, 160, 89, 0.45);
  background: rgba(199, 160, 89, 0.11);
}

.client-steps span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-steps h4 {
  margin: 6px 0;
  color: #fff;
}

.client-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.client-offer-card .order-meta-grid,
.client-project-card .order-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .client-dashboard .workbench-grid,
  .client-projects .workbench-grid,
  .client-docs .workbench-grid {
    grid-template-columns: 1fr;
  }

  .client-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .client-steps,
  .client-offer-card .order-meta-grid,
  .client-project-card .order-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* A5 staging: simple, explicit communication entry points. */
#portal .a5-message-actions,
#portal .a5-chat-chooser,
#portal .a5-admin-chat-chooser {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #101315;
  color: #ffffff;
}

#portal .a5-message-actions {
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
  padding: 18px;
}

#portal .a5-message-actions-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 18px;
  align-items: end;
}

#portal .a5-message-actions-head > div,
#portal .a5-message-action-grid,
#portal .a5-message-action-grid button,
#portal .a5-chat-chooser .chat-case-list,
#portal .a5-admin-chat-chooser .admin-partner-list {
  min-width: 0;
}

#portal .a5-message-actions-head span {
  display: block;
  margin-bottom: 5px;
  color: #d8bd7a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a5-message-actions-head h3,
#portal .a5-message-actions-head p {
  margin: 0;
  overflow-wrap: anywhere;
}

#portal .a5-message-actions-head p {
  color: #b9c2be;
  line-height: 1.5;
}

#portal .a5-message-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#portal .a5-message-action-grid button {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 132px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: #080a0b;
  color: #ffffff;
  text-align: left;
  white-space: normal;
}

#portal .a5-message-action-grid button:hover,
#portal .a5-message-action-grid button:focus-visible {
  border-color: #d8bd7a;
  background: #15191b;
}

#portal .a5-message-action-grid button strong,
#portal .a5-message-action-grid button span,
#portal .a5-message-action-grid button small {
  overflow-wrap: anywhere;
}

#portal .a5-message-action-grid button strong {
  font-size: 16px;
}

#portal .a5-message-action-grid button span {
  color: #b9c2be;
  line-height: 1.45;
}

#portal .a5-message-action-grid button small {
  align-self: end;
  color: #d8bd7a;
  font-weight: 800;
}

#portal .a5-chat-chooser,
#portal .a5-admin-chat-chooser {
  padding: 14px;
}

#portal .a5-chat-chooser .chat-case,
#portal .a5-admin-chat-chooser .admin-partner-button {
  width: 100%;
  min-height: 64px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#portal .communication-group-form select,
#portal .communication-group-form input,
#portal .communication-group-form textarea,
#portal #admin-partner-chat-form input,
#portal #admin-partner-chat-form textarea,
#portal [data-chat-form] input,
#portal [data-chat-form] textarea,
#portal [data-group-chat-form] input,
#portal [data-group-chat-form] textarea,
#portal #app-mail-compose-form input,
#portal #app-mail-compose-form select,
#portal #app-mail-compose-form textarea {
  max-width: 100%;
  min-width: 0;
}

#portal .communication-group-form select,
#portal .communication-group-form input,
#portal #admin-partner-chat-form input,
#portal [data-chat-form] input,
#portal [data-group-chat-form] input,
#portal #app-mail-compose-form input,
#portal #app-mail-compose-form select {
  min-height: 44px;
}

@media (max-width: 760px) {
  #portal .a5-message-actions-head,
  #portal .a5-message-action-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a5-message-action-grid button {
    min-height: 104px;
  }

  #portal .a5-message-actions,
  #portal .a5-chat-chooser,
  #portal .a5-admin-chat-chooser,
  #portal .communication-group-form,
  #portal #admin-partner-chat-form,
  #portal [data-chat-form],
  #portal [data-group-chat-form],
  #portal #app-mail-compose-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #portal .app-mail-workbench,
  #portal .app-mail-grid .stage7-list {
    padding: 12px;
  }

  #portal #app-mail-compose-form {
    padding: 14px;
  }
}

/* A4L: final shared shell demo. Neutral data, no production actions. */
#portal .a4l-demo-panel,
#portal .a4l-demo-work,
#portal .a4l-demo-more {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#portal .a4l-demo-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#portal .a4l-demo-actions > button,
#portal .a4l-demo-case-list > button {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: #101315;
  color: #ffffff;
  text-align: left;
  white-space: normal;
}

#portal .a4l-demo-actions > button {
  flex-direction: column;
}

#portal .a4l-demo-actions > button.primary {
  border-color: rgba(104, 220, 166, 0.46);
  background: #13231d;
}

#portal .a4l-demo-actions strong,
#portal .a4l-demo-case-list strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a4l-demo-actions span,
#portal .a4l-demo-case-list small,
#portal .a4l-demo-case-list em,
#portal .a4l-demo-safety {
  color: #b8c3be;
  font-style: normal;
  line-height: 1.45;
}

#portal .a4l-demo-case-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#portal .a4l-demo-case-list > button > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#portal .a4l-demo-case-list > button > span:last-child {
  justify-items: end;
  text-align: right;
}

#portal .a4l-demo-safety {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #68dca6;
  background: #0c100f;
}

#portal .a4l-demo-next-actions,
#portal .a4l-demo-visibility {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #101315;
}

#portal .a4l-demo-next-actions h3,
#portal .a4l-demo-visibility h3 {
  margin: 4px 0 0;
}

#portal .a4l-demo-message-list {
  display: grid;
  gap: 8px;
}

#portal .a4l-demo-message-list article {
  display: grid;
  grid-template-columns: minmax(82px, 0.35fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #101315;
}

#portal .a4l-demo-message-list article > span {
  color: #68dca6;
  font-weight: 700;
}

#portal .a4l-demo-message-list article > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#portal .a4l-demo-message-list article strong,
#portal .a4l-demo-message-list article small {
  overflow-wrap: anywhere;
}

#portal .a4l-demo-message-list article small {
  color: #aeb8b3;
}

#portal .a4l-demo-message-list article button,
#portal .a4l-demo-compose button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #171b1d;
  color: #ffffff;
  white-space: normal;
}

#portal .a4l-demo-compose {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #0c0f10;
}

#portal .a4l-demo-compose label {
  display: grid;
  gap: 7px;
}

#portal .a4l-demo-compose textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #080a0b;
  color: #ffffff;
  font: inherit;
}

#portal .a4l-demo-visibility {
  align-items: flex-start;
  flex-wrap: wrap;
}

#portal .a4l-demo-visibility ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #e8eeeb;
}

#portal .a4l-demo-visibility p {
  flex-basis: 100%;
  margin: 0;
  color: #aeb8b3;
}

@media (max-width: 820px) {
  #portal .a4l-demo-actions,
  #portal .a4l-demo-case-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a4l-demo-message-list article {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a4l-demo-message-list article button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  #portal .a4l-demo-next-actions,
  #portal .a4l-demo-visibility {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a4l-demo-next-actions .mini-actions,
  #portal .a4l-demo-compose .mini-actions,
  #portal .a4l-demo-next-actions button,
  #portal .a4l-demo-compose button {
    width: 100%;
  }

  #portal .a4l-demo-case-list > button {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a4l-demo-case-list > button > span:last-child {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 980px) {
  .stage3-head,
  .stage3-metrics,
  .stage4-hero,
  .stage4-grid,
  .stage4-metrics,
  .stage4-playbook,
  .stage5-hero,
  .stage5-grid,
  .stage5-metrics,
  .stage5-detail-grid,
  .stage5-response-summary,
  .stage6-hero,
  .stage6-grid,
  .stage6-metrics,
  .stage6-detail-grid,
  .stage6-send-options,
  .stage6-quick-rfq-panel,
  .stage6-bulk-panel,
  .stage7-hero,
  .stage7-grid,
  .stage7-metrics,
  .stage7-ai-summary,
  .stage7-materials,
  .stage7-assign-form,
  .stage7-simple-mail-panel,
  .stage7-simple-compose-form,
  .mail-tracking-head,
  .mail-tracking-focus,
  .mail-tracking-followup,
  .stage7-mail-toolbar,
  .stage7-sync-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage7-folder-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sandbox-credentials button,
  .stage3-head,
  .stage3-metrics,
  .stage4-hero,
  .stage4-grid,
  .stage4-metrics,
  .stage4-playbook,
  .stage5-hero,
  .stage5-grid,
  .stage5-metrics,
  .stage5-detail-grid,
  .stage5-response-summary,
  .stage6-hero,
  .stage6-grid,
  .stage6-metrics,
  .stage6-detail-grid,
  .stage6-send-options,
  .stage6-quick-rfq-panel,
  .stage6-bulk-panel,
  .stage6-bulk-actions,
  .stage7-hero,
  .stage7-grid,
  .stage7-metrics,
  .stage7-ai-summary,
  .stage7-materials,
  .stage7-assign-form,
  .stage7-simple-mail-panel,
  .stage7-simple-compose-form,
  .mail-tracking-head,
  .mail-tracking-focus,
  .mail-tracking-followup,
  .stage7-mail-toolbar,
  .stage7-sync-form {
    grid-template-columns: 1fr;
  }
  .stage7-folder-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage7-folder-bar button {
    min-height: 44px;
  }
  .stage7-simple-compose-form .wide-field {
    grid-column: auto;
  }
  .stage6-mail-row,
  .factory-rfq-suggestion-row {
    grid-template-columns: 1fr;
  }
  .stage6-mail-check {
    place-items: center start;
    padding-top: 0;
  }
}

.tour-modal,
.tour-modal * {
  min-width: 0;
}

.tour-modal {
  width: min(1180px, calc(100vw - 28px));
}

.tour-head > div:first-child,
.tour-head-actions,
.tour-language-switcher,
.tour-step-copy,
.tour-action-card,
.tour-step-tabs button,
.tour-flow span {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.tour-language-switcher {
  max-width: 360px;
}

.tour-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.tour-step-tabs {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.tour-step-tabs button {
  min-height: 48px;
  padding: 10px;
}

.tour-flow {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.tour-flow span {
  display: grid;
  place-items: center;
  line-height: 1.2;
}

.distributor-flow-panel,
.distributor-materials-workbench {
  min-width: 0;
}

.distributor-flow-panel {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(240,193,104,.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,24,24,.9), rgba(0,0,0,.38)),
    radial-gradient(circle at 100% 0, rgba(216,155,47,.12), transparent 34%);
}

.distributor-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.distributor-flow-steps article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}

.distributor-flow-steps strong {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #080808;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.distributor-flow-steps span {
  display: block;
  margin-top: 10px;
  color: var(--gold-2);
  font-weight: 900;
}

.distributor-flow-steps p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.distributor-material-layout {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: 14px;
  min-width: 0;
}

.distributor-material-list,
.distributor-material-columns {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.distributor-material-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.distributor-material-card {
  width: 100%;
  min-height: 150px;
  text-align: left;
  cursor: pointer;
}

.distributor-material-card.active {
  border-color: rgba(240,193,104,.72);
  background:
    linear-gradient(180deg, rgba(216,155,47,.16), rgba(0,0,0,.24)),
    radial-gradient(circle at 100% 0, rgba(240,193,104,.13), transparent 34%);
}

.distributor-material-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.distributor-material-columns .request-card {
  margin: 0;
}

.distributor-material-columns ul {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.material-message-box {
  width: 100%;
  margin-top: 8px;
  resize: vertical;
}

.distributor-material-target {
  margin-top: 12px;
}

.distributor-draft-card {
  border-color: rgba(240,193,104,.36);
  background: rgba(216,155,47,.08);
}

@media (max-width: 1080px) {
  .distributor-material-layout,
  .distributor-flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .tour-modal {
    width: calc(100vw - 20px);
  }

  .tour-action-grid,
  .tour-step-tabs,
  .distributor-material-layout,
  .distributor-material-columns,
  .distributor-flow-steps {
    grid-template-columns: 1fr;
  }
}

/* Login hardening for partner access: no clipped headings or overflowing role tiles. */
.portal-section .section-heading,
.portal-section .section-heading h2,
.portal-login,
.login-card,
.login-fields {
  min-width: 0;
  max-width: 100%;
}

.portal-section .section-heading h2 {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.portal-grid[data-locked="true"] {
  width: min(100%, 640px);
  margin-inline: auto;
}

.role-picker {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.role-picker button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 9px 7px;
  overflow: hidden;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 760px) {
  .portal-section .section-heading h2 {
    font-size: clamp(28px, 8.4vw, 42px);
    line-height: 1.04;
  }

  .portal-grid[data-locked="true"] {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .login-card {
    padding: 18px;
  }

  .role-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .role-picker button {
    min-height: 54px;
    font-size: 9.5px;
    line-height: 1.12;
  }

  .password-input-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .password-toggle {
    width: 100%;
  }
}

/* CEIG factory scout */
.factory-scout-workbench {
  display: grid;
  gap: 16px;
}

.factory-scout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7,11,11,.96), rgba(14,24,22,.92)),
    radial-gradient(circle at 88% 0%, rgba(216,155,47,.20), transparent 32%);
}

.factory-scout-hero h3 {
  margin: 10px 0;
  color: var(--gold-2);
  font-size: 28px;
  line-height: 1.05;
  text-transform: uppercase;
}

.factory-scout-hero p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
}

.factory-scout-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
}

.factory-scout-stats article {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}

.factory-scout-stats strong {
  color: var(--gold-2);
  font-size: 28px;
}

.factory-scout-stats span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.factory-scout-grid {
  display: grid;
  grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr);
  gap: 16px;
  align-items: start;
}

.factory-scout-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.factory-scout-card {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255,255,255,.035);
  cursor: pointer;
}

.factory-scout-card:hover,
.factory-scout-card.active {
  border-color: rgba(240,193,104,.62);
  background: rgba(216,155,47,.10);
}

.factory-scout-card strong {
  color: var(--gold-2);
  font-size: 16px;
}

.factory-scout-card small,
.factory-scout-card p,
.factory-scout-card em {
  margin: 0;
  color: var(--muted);
}

.factory-scout-card em {
  color: var(--gold-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.factory-scout-score {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.10);
}

.factory-scout-score span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d89b2f, #f0c168);
}

.factory-scout-selected {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}

.factory-scout-selected h3 {
  margin: 0;
  color: var(--gold-2);
}

.factory-scout-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.factory-scout-tags span {
  padding: 6px 8px;
  border: 1px solid rgba(216,155,47,.22);
  border-radius: 99px;
  color: var(--text);
  background: rgba(216,155,47,.08);
  font-size: 11px;
  font-weight: 800;
}

.factory-scout-rfq-form textarea {
  min-height: 220px;
}

.factory-search-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    rgba(0,0,0,.18);
}

.factory-search-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.factory-privacy-panel,
.factory-strategic-panel,
.factory-batch-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.factory-privacy-panel p,
.factory-strategic-panel p,
.factory-batch-panel p {
  color: var(--muted);
  margin: 6px 0;
}

.factory-privacy-panel small,
.factory-strategic-grid small,
.factory-strategic-results small,
.factory-strategy-facts small {
  color: var(--quiet);
  display: block;
  line-height: 1.45;
}

.factory-strategic-grid,
.factory-strategic-results {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.factory-strategic-grid article,
.factory-strategic-results article {
  border: 1px solid rgba(216,155,47,.16);
  border-radius: 8px;
  padding: 11px;
  background: rgba(0,0,0,.18);
}

.factory-strategic-results article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.factory-rfq-launcher {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(82,174,116,.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(82,174,116,.09), rgba(0,0,0,.22));
}

.factory-rfq-launcher-head,
.factory-rfq-launcher-grid {
  display: grid;
  gap: 12px;
  align-items: end;
}

.factory-rfq-launcher-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.factory-rfq-launcher-grid {
  grid-template-columns: minmax(280px, 1fr) minmax(160px, .32fr) auto;
}

.factory-rfq-launcher h3 {
  margin: 8px 0 6px;
  color: var(--text);
}

.factory-rfq-launcher p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.factory-rfq-launcher label {
  margin: 0;
}

.factory-rfq-launcher select {
  width: 100%;
}

.factory-rfq-launcher-count,
.factory-rfq-launcher-grid article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  min-width: 150px;
}

.factory-rfq-launcher-count strong,
.factory-rfq-launcher-grid article strong {
  color: #d9f4df;
  font-size: 30px;
  line-height: 1;
}

.factory-rfq-launcher-count small,
.factory-rfq-launcher-grid article small,
.factory-rfq-launcher-grid article span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.factory-rfq-launcher-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.factory-rfq-scope-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.factory-rfq-scope-row span {
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 11px;
  font-weight: 800;
}

.factory-rfq-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.factory-rfq-suggestion-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.factory-rfq-suggestion-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, .36fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.16);
}

.factory-rfq-suggestion-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold-2);
}

.factory-rfq-suggestion-row strong,
.factory-rfq-suggestion-row small,
.factory-rfq-suggestion-row em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.factory-rfq-suggestion-row strong {
  color: var(--text);
}

.factory-rfq-suggestion-row small,
.factory-rfq-suggestion-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.factory-batch-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(82,174,116,.24);
  background: linear-gradient(135deg, rgba(82,174,116,.075), rgba(0,0,0,.18));
}

.factory-batch-actions {
  display: grid;
  gap: 5px;
  justify-items: stretch;
  min-width: 150px;
  text-align: center;
}

.factory-batch-actions strong {
  color: #d9f4df;
  font-size: 30px;
  line-height: 1;
}

.factory-batch-actions small {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.factory-core-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.factory-core-chip {
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(216,155,47,.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.2);
  text-align: left;
  cursor: pointer;
}

.factory-core-chip:hover,
.factory-core-chip:focus-visible {
  border-color: rgba(216,155,47,.48);
  background: rgba(216,155,47,.08);
}

.factory-core-chip strong,
.factory-core-chip small {
  display: block;
}

.factory-core-chip strong {
  color: var(--gold-2);
  font-size: 13px;
  line-height: 1.25;
}

.factory-core-chip small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.factory-source-hints,
.factory-contact-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.factory-source-hints {
  padding: 10px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}

.factory-source-hints small,
.factory-contact-lines small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.16);
  font-size: 11px;
  line-height: 1.2;
}

.factory-strategy-facts {
  display: grid;
  gap: 3px;
  margin: 8px 0 10px;
}

.strategic-pill {
  border-color: rgba(76,138,98,.42);
  background: rgba(76,138,98,.16);
  color: #ccebd5;
}

.factory-search-layout {
  display: grid;
  grid-template-columns: minmax(260px, .46fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.factory-search-history {
  display: grid;
  gap: 10px;
}

.factory-search-history h4,
.factory-search-results h4 {
  margin: 0;
  color: var(--gold-2);
  text-transform: uppercase;
}

.factory-search-results {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.factory-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .22fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(216,155,47,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}

.factory-search-result.direct-result {
  border-color: rgba(216,155,47,.34);
  background: linear-gradient(135deg, rgba(216,155,47,.08), rgba(0,0,0,.18));
}

.factory-search-result.directory-result {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
}

.domain-pill.direct {
  color: #17110a;
  background: linear-gradient(135deg, #f4c261, #c68622);
  border-color: rgba(244,194,97,.6);
}

.domain-pill.directory,
.domain-pill.neutral {
  color: var(--muted);
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.14);
}

.domain-reason,
.ai-profile-note {
  display: block;
  margin: -2px 0 10px;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.45;
}

.ai-profile-note {
  color: rgba(244,194,97,.82);
}

.privacy-audit-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.privacy-audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.privacy-audit-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.privacy-audit-stats article,
.privacy-audit-row {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.privacy-audit-stats strong {
  display: block;
  color: var(--gold-2);
  font-size: 24px;
  line-height: 1.05;
}

.privacy-audit-stats span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.privacy-audit-list {
  display: grid;
  gap: 8px;
}

.privacy-audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.privacy-audit-row.critical {
  border-color: rgba(157,77,67,.58);
  background: rgba(157,77,67,.12);
}

.privacy-audit-row.warning {
  border-color: rgba(216,155,47,.48);
}

.privacy-audit-row.ok {
  grid-template-columns: 1fr;
  border-color: rgba(76,138,98,.42);
}

.privacy-audit-row p,
.privacy-audit-row small {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.privacy-audit-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, .16fr) minmax(150px, .2fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.privacy-audit-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.privacy-audit-toolbar label > span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.privacy-audit-toolbar input,
.privacy-audit-toolbar select {
  width: 100%;
  min-width: 0;
}

.privacy-report-mode {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.privacy-report-mode input {
  width: auto;
}

.privacy-report-mode span {
  color: var(--muted);
}

.privacy-audit-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}

.privacy-audit-bulk > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.privacy-audit-bulk > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-case-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.privacy-case-row.critical {
  border-color: rgba(157,77,67,.58);
  background: rgba(157,77,67,.12);
}

.privacy-case-row.warning {
  border-color: rgba(216,155,47,.42);
}

.privacy-case-select {
  display: grid;
  place-items: center;
  min-height: 32px;
}

.privacy-case-select input {
  width: 18px;
  height: 18px;
}

.privacy-case-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.privacy-case-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.privacy-case-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.privacy-case-meta,
.privacy-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.privacy-case-meta span,
.privacy-case-tags span {
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.privacy-case-preview {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy-case-preview li {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0,0,0,.16);
}

.privacy-case-preview strong {
  color: var(--gold-2);
  font-size: 12px;
}

.privacy-case-preview span,
.privacy-case-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.privacy-case-actions {
  display: grid;
  gap: 8px;
  min-width: 124px;
}

.factory-search-result h4 {
  margin: 8px 0;
  line-height: 1.15;
}

.factory-search-result p {
  margin: 0 0 10px;
  color: var(--muted);
}

.factory-search-actions {
  display: grid;
  gap: 7px;
  align-content: center;
  justify-items: stretch;
  text-align: center;
}

.factory-search-actions strong {
  color: var(--gold-2);
  font-size: 30px;
  line-height: 1;
}

.factory-search-actions small {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .factory-scout-hero,
  .factory-scout-grid,
  .factory-search-layout,
  .factory-search-result,
  .factory-rfq-launcher-head,
  .factory-rfq-launcher-grid,
  .factory-rfq-suggestion-row,
  .factory-batch-panel,
  .factory-core-preview,
  .factory-strategic-grid,
  .factory-strategic-results,
  .privacy-audit-toolbar,
  .privacy-case-row,
  .offer-matrix-summary {
    grid-template-columns: 1fr;
  }

  .privacy-case-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .privacy-audit-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .privacy-audit-row,
  .privacy-audit-toolbar,
  .privacy-case-row,
  .privacy-case-actions {
    grid-template-columns: 1fr;
  }

  .privacy-audit-bulk {
    align-items: stretch;
    flex-direction: column;
  }

  .privacy-audit-bulk > div {
    width: 100%;
  }

  .privacy-audit-bulk .small-button {
    flex: 1 1 140px;
  }

  .backend-status-strip,
  .dropbox-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .dropbox-head-actions .small-button {
    width: 100%;
  }
}

.micro-b2b-section {
  background: linear-gradient(180deg, rgba(17,28,27,.96), rgba(5,6,6,.98));
}

.micro-b2b-layout {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.micro-b2b-benefits,
.micro-b2b-form,
.micro-b2b-admin-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
}

.micro-b2b-benefits {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.micro-b2b-benefits h3,
.micro-b2b-benefits p {
  margin: 0;
}

.micro-b2b-benefits ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.micro-b2b-info-stack {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.micro-b2b-info-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.16);
  padding: 13px;
}

.micro-b2b-info-card strong {
  color: var(--gold-2);
  font-size: 13px;
}

.micro-b2b-info-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.micro-b2b-info-card.compact {
  gap: 9px;
}

.micro-b2b-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.micro-b2b-tags span {
  border: 1px solid rgba(216,155,47,.28);
  border-radius: 999px;
  background: rgba(216,155,47,.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  text-transform: uppercase;
}

.micro-b2b-fit-card {
  margin-top: auto;
}

.micro-b2b-fit-grid {
  display: grid;
  gap: 8px;
}

.micro-b2b-fit-grid span {
  display: grid;
  gap: 2px;
  border-left: 3px solid rgba(216,155,47,.55);
  padding-left: 10px;
}

.micro-b2b-fit-grid b {
  color: var(--text);
  font-size: 12px;
}

.micro-b2b-fit-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.micro-b2b-form {
  padding: 20px;
}

.micro-b2b-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.micro-b2b-admin-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
}

.micro-b2b-admin-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr);
  gap: 14px;
  align-items: start;
}

.micro-b2b-admin-head h3,
.micro-b2b-admin-head p {
  margin: 0;
}

.micro-b2b-admin-head > div:first-child {
  display: grid;
  gap: 8px;
}

.micro-b2b-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.micro-b2b-admin-stats .dashboard-card {
  min-height: 82px;
  padding: 12px;
  text-align: left;
}

.micro-b2b-admin-stats .dashboard-card strong {
  display: block;
  line-height: 1;
}

.micro-b2b-admin-stats .dashboard-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.micro-b2b-lead-list {
  display: grid;
  gap: 8px;
}

.micro-b2b-lead-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(92px, auto);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.micro-b2b-lead-row span,
.micro-b2b-lead-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .micro-b2b-layout,
  .micro-b2b-admin-head,
  .micro-b2b-lead-row {
    grid-template-columns: 1fr;
  }

  .micro-b2b-form .form-grid,
  .micro-b2b-admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .micro-b2b-form .form-grid,
  .micro-b2b-admin-stats {
    grid-template-columns: 1fr;
  }
}

.mobile-pwa-workbench,
.partner-team-workbench {
  min-width: 0;
}

.mobile-app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(240,193,104,.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(12,16,16,.96), rgba(25,29,27,.86));
}

.mobile-app-hero h3 {
  margin: 8px 0 6px;
  color: var(--gold-2);
  font-size: 24px;
}

.mobile-app-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mobile-install-card {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.mobile-install-card[hidden] {
  display: none;
}

.mobile-install-card h3 {
  margin: 8px 0 6px;
  color: var(--text);
}

.mobile-install-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mobile-install-steps {
  display: grid;
  gap: 8px;
}

.mobile-install-steps article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(240,193,104,.18);
  border-radius: 8px;
  background: rgba(216,155,47,.06);
}

.mobile-install-steps strong,
.mobile-install-steps span {
  display: block;
}

.mobile-install-steps strong {
  color: var(--gold-2);
  font-size: 13px;
}

.mobile-install-steps span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.mobile-app-grid,
.chat-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-case-list,
.mobile-notification-list {
  display: grid;
  gap: 10px;
}

.mobile-case-card,
.mobile-notification-card,
.privacy-guard-inline {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.mobile-case-card h4,
.mobile-notification-card h4 {
  margin: 8px 0;
  color: var(--text);
}

.mobile-case-card p,
.mobile-notification-card p,
.privacy-guard-inline p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.mobile-notification-card.warning,
.mobile-notification-card.files {
  border-color: rgba(240,193,104,.32);
  background: rgba(216,155,47,.08);
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-attachments .file-chip {
  text-decoration: none;
}

.chat-attachments .file-chip.transfer {
  border-color: rgba(75,181,167,.38);
}

.privacy-guard-inline {
  border-color: rgba(75,181,167,.28);
  background: rgba(75,181,167,.06);
}

.privacy-guard-inline strong,
.privacy-guard-ok {
  color: var(--gold-2);
}

.partner-team-list .compact-form {
  margin-top: 12px;
}

.partner-internal-thread {
  min-height: 300px;
}

@media (max-width: 760px) {
  .mobile-app-hero,
  .mobile-install-card,
  .mobile-app-grid,
  .chat-form-grid {
    grid-template-columns: 1fr;
  }
}

.mobile-app-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

.mobile-brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.ceig-app-wordmark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--gold-2);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.mobile-brand-lockup > div h2,
.mobile-brand-lockup > div p,
.mobile-brand-lockup > div strong,
.mobile-brand-lockup > div span {
  margin: 0;
}

.mobile-brand-lockup > div h2,
.mobile-brand-lockup > div strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.mobile-brand-lockup > div p,
.mobile-brand-lockup > div span {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.mobile-user-chip,
.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-user-chip {
  gap: 8px;
  color: var(--muted);
}

.mobile-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.mobile-icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(240,193,104,.32);
  background: rgba(240,193,104,.1);
  color: var(--gold-2);
}

.mobile-icon-button::before {
  content: "CE";
  font-size: 12px;
  font-weight: 800;
}

.mobile-icon-button b {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold-2);
  color: #101312;
  font-size: 11px;
  line-height: 18px;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240,193,104,.35);
  border-radius: 50%;
  background: rgba(240,193,104,.12);
  color: var(--gold-2);
  font-weight: 700;
  overflow: hidden;
}

.profile-avatar.small {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ceig-team-grid,
.app-mail-grid {
  align-items: start;
}

.ceig-role-matrix,
.ceig-team-list {
  display: grid;
  gap: 10px;
}

.ceig-role-card,
.ceig-team-account,
.communication-group-card,
.business-client-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.ceig-role-card h4,
.ceig-team-account h4,
.business-client-card h4 {
  margin: 8px 0;
  color: var(--text);
}

.ceig-role-card p,
.ceig-role-card small,
.ceig-team-account p,
.ceig-team-account small,
.business-client-card p,
.business-client-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.org-invite-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(240,193,104,.18);
  border-radius: 8px;
  background: rgba(216,155,47,.055);
}

.org-invite-panel.compact {
  margin-top: 12px;
}

.org-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}

.permission-option input {
  margin-top: 3px;
}

.permission-option strong,
.permission-option small {
  display: block;
}

.permission-option strong {
  color: var(--text);
  font-size: 12px;
}

.permission-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.org-invite-list {
  display: grid;
  gap: 8px;
}

.org-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.org-invite-row h4 {
  margin: 8px 0 4px;
  color: var(--text);
}

.org-invite-row p,
.org-invite-row small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.org-invite-row input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  background: rgba(0,0,0,.22);
  color: var(--muted);
  padding: 8px;
  font-size: 11px;
}

@media (max-width: 760px) {
  .pwa-install-notice {
    grid-template-columns: 1fr;
  }

  .pwa-install-actions {
    min-width: 0;
  }

  .org-permission-grid,
  .org-invite-row {
    grid-template-columns: 1fr;
  }
}

.role-grants,
.participant-strip,
.app-mail-tracking-actions,
.app-mail-tracking-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.role-grants span,
.participant-strip span {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 12px;
}

.communication-group-card {
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.communication-group-card.active,
.business-client-card.active,
.ceig-team-account.active,
.app-mail-card.active {
  border-color: rgba(240,193,104,.45);
  background: rgba(240,193,104,.08);
}

.message-translation {
  margin-top: 8px;
  padding: 8px;
  border-left: 2px solid rgba(75,181,167,.55);
  background: rgba(75,181,167,.07);
}

.message-translation span,
.app-mail-tracking-summary small {
  color: var(--muted);
  font-size: 12px;
}

.mobile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.mobile-gallery-item {
  min-height: 108px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.035);
}

.mobile-gallery-item img,
.mobile-gallery-item video {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.app-mail-hero .stage7-sync-form {
  min-width: 220px;
}

.app-mail-detail pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.app-mail-tracking-actions {
  margin: 10px 0;
}

.app-mail-compose-form {
  margin-top: 12px;
}

.social-panel,
.mail-live-panel {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.social-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.social-panel-head strong {
  color: var(--text);
}

.social-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.social-user-list,
.mail-live-grid {
  display: grid;
  gap: 8px;
}

.social-user-card,
.social-activity-row,
.mail-live-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(0,0,0,.08);
}

.social-user-card strong,
.social-activity-row strong,
.mail-live-card strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.social-user-card small,
.social-activity-row small,
.mail-live-card small,
.chat-live-hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  box-shadow: 0 0 0 4px rgba(255,255,255,.035);
}

.live-dot.on {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(75,181,167,.14);
}

.mail-live-card.live {
  border-color: rgba(75,181,167,.42);
  background: rgba(75,181,167,.08);
}

.chat-live-hint {
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}

.chat-live-hint.online {
  color: var(--green);
  border-color: rgba(75,181,167,.28);
  background: rgba(75,181,167,.08);
}

@media (max-width: 760px) {
  .mobile-app-topbar,
  .app-mail-hero {
    grid-template-columns: 1fr;
  }

  .mobile-user-chip {
    justify-content: flex-start;
  }

  .app-mail-hero .stage7-sync-form {
    min-width: 0;
  }
}

/* CEIG App premium black/gold visual layer */
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app),
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card {
  background:
    linear-gradient(180deg, #f8f8f5 0%, #f1f2ee 100%);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card .mobile-app-topbar {
  border-bottom: 1px solid #ded8c8;
  background: rgba(255,255,252,.98);
  box-shadow: 0 12px 32px rgba(20,17,12,.08);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .ceig-app-wordmark,
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .mobile-brand-lockup > div strong {
  color: #14110c;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .mobile-brand-lockup > div span {
  color: #6d6759;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .profile-avatar.small,
.ceig-social-avatar,
.ceig-chat-avatar {
  border-color: #fff;
  background: linear-gradient(135deg, #fffdf7, #efe7d2);
  color: #14110c;
  box-shadow: 0 0 0 1px rgba(176,138,54,.32), 0 8px 22px rgba(20,17,12,.1);
}

.ceig-social-cover {
  background:
    radial-gradient(circle at 82% 20%, rgba(197,157,74,.42), transparent 24%),
    linear-gradient(135deg, #15130f 0%, #302a1e 58%, #17140f 100%);
}

.ceig-social-cover::after {
  background: linear-gradient(90deg, rgba(197,157,74,.96), rgba(197,157,74,.18));
}

.ceig-social-profile-card,
.ceig-social-stats,
.ceig-social-composer-card,
.ceig-social-feed,
.ceig-social-post,
.ceig-social-case-strip,
.ceig-chat-person,
.ceig-chat-thread-card,
.ceig-app-panel-card,
.ceig-social-media-feed .ceig-media-item {
  border-color: #ddd5bf;
  background: #fffefb;
  box-shadow: 0 12px 30px rgba(20,17,12,.065);
}

.ceig-social-profile-body h3,
.ceig-social-feed-head h3,
.ceig-social-inbox-head h3,
.ceig-social-thread-header h3,
.ceig-social-post-head strong,
.ceig-chat-person strong,
.ceig-chat-thread-head strong,
.ceig-social-case-strip strong,
.ceig-media-item strong,
.ceig-social-composer-card strong,
.ceig-app-section-head h3 {
  color: #14110c;
}

.ceig-social-profile-body p,
.ceig-social-stats span,
.ceig-social-post-head small,
.ceig-social-post p,
.ceig-social-inbox-head p,
.ceig-social-thread-header p,
.ceig-chat-person small,
.ceig-social-case-strip span,
.ceig-media-item span,
.ceig-social-composer-card small,
.ceig-app-section-head p {
  color: #6d6759;
}

.ceig-social-actions button,
.ceig-social-post-actions button,
.ceig-social-feed-head button,
.ceig-social-case-strip button,
.ceig-social-inbox-head button,
.ceig-media-item button,
.ceig-camera-actions label,
.ceig-camera-meta button,
.ceig-social-thread-header > button {
  border-color: #cdbb89;
  background: #fffefb;
  color: #14110c;
  box-shadow: inset 0 -1px 0 rgba(197,157,74,.16);
}

.ceig-social-actions button.primary,
.ceig-social-tabs button.active,
.ceig-camera-actions label.primary,
.ceig-camera-meta button.active {
  border-color: #14110c;
  background: #14110c;
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(197,157,74,.78);
}

.ceig-social-actions button:hover,
.ceig-social-post-actions button:hover,
.ceig-social-feed-head button:hover,
.ceig-social-case-strip button:hover,
.ceig-social-inbox-head button:hover,
.ceig-media-item button:hover,
.ceig-social-thread-header > button:hover {
  border-color: #b08a36;
  background: #fbf6e9;
}

.ceig-social-stats strong,
.ceig-chat-person em,
.ceig-chat-thread-head em {
  color: #9a762a;
}

.ceig-chat-person em,
.ceig-chat-thread-head em {
  background: #fbf2dc;
}

.ceig-social-search,
.ceig-social-composer-card button,
.ceig-social-composer-card.media > div {
  border-color: #ddd5bf;
  background: #fffefb;
  color: #302a1e;
}

.ceig-social-tabs {
  border-color: #ddd5bf;
  background: #f8f6ef;
}

.ceig-social-tabs button {
  color: #5f594d;
}

.ceig-social-policy,
.ceig-chat-privacy {
  border-color: #ddd1ad;
  background: #fffaf0;
  color: #302a1e;
}

.ceig-chat-person.active,
.ceig-chat-person:hover {
  border-color: #b08a36;
  background: #fffaf0;
}

.ceig-chat-avatar i,
.online-dot.on,
.live-dot.on {
  background: #b08a36;
  box-shadow: 0 0 0 4px rgba(176,138,54,.13);
}

.ceig-chat-avatar i:not(.on) {
  background: #b8b0a0;
}

.ceig-social-thread .ceig-chat-message {
  border-color: #ddd5bf;
  background: #fffefb;
}

.ceig-social-thread .ceig-chat-message.mine {
  border-color: #d6c391;
  background: #fff8e8;
}

.ceig-chat-warning {
  border-color: rgba(176,138,54,.5);
  background: #fff5dd;
  color: #6b4d12;
}

.ceig-chat-attachment {
  border-color: #ddd5bf;
  background: #faf8f1;
}

.ceig-social-camera-preview {
  background:
    linear-gradient(180deg, rgba(20,17,12,.04), rgba(20,17,12,.52)),
    radial-gradient(circle at 18% 18%, rgba(197,157,74,.42), transparent 28%),
    linear-gradient(135deg, #e7e1d2, #938b7c);
}

.ceig-camera-preview span {
  background: rgba(20,17,12,.38);
  color: #f7d891;
}

.ceig-media-thumb,
.ceig-app-media-thumb {
  background: linear-gradient(135deg, rgba(197,157,74,.18), rgba(20,17,12,.08));
  color: #8a6925;
}

.ceig-app-nav {
  border-color: #ddd5bf;
  background: rgba(255,255,252,.98);
  box-shadow: 0 16px 38px rgba(20,17,12,.13);
}

.app-mobile-tab-button {
  color: #6d6759;
}

.app-mobile-tab-button::before {
  background: #f4efe2;
  color: #8a6925;
}

.app-mobile-tab-button.active {
  background: #f7efd9;
  color: #14110c;
}

.app-mobile-tab-button.active::before {
  background: #14110c;
  color: #f4cf7a;
}

.app-settings-trigger {
  appearance: none;
  cursor: pointer;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .mobile-brand-lockup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #ddd5bf;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,252,.92), rgba(250,247,238,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .ceig-app-wordmark {
  padding: 7px 10px;
  border: 1px solid #cdbb89;
  border-radius: 12px;
  background: #14110c;
  color: #f4cf7a;
  font-size: 18px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(244,207,122,.4);
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .profile-avatar.small {
  border-radius: 15px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .profile-avatar.small:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(176,138,54,.45), 0 12px 28px rgba(20,17,12,.14);
}

.ceig-mail-screen,
.ceig-settings-screen {
  gap: 12px;
}

.ceig-mail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #ddd5bf;
  border-radius: 14px;
  background: #fffefb;
}

.ceig-mail-summary article {
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  border-right: 1px solid #eee7d6;
}

.ceig-mail-summary article:last-child {
  border-right: 0;
}

.ceig-mail-summary strong {
  color: #14110c;
  font-size: 18px;
}

.ceig-mail-summary span {
  color: #6d6759;
  font-size: 11px;
}

.ceig-mail-composer-card,
.ceig-mail-detail-card,
.ceig-settings-profile,
.ceig-settings-card,
.ceig-settings-grid article {
  border: 1px solid #ddd5bf;
  border-radius: 14px;
  background: #fffefb;
  box-shadow: 0 10px 26px rgba(20,17,12,.055);
}

.ceig-mail-composer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.ceig-mail-composer-card > div {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ceig-mail-composer-card > div strong,
.ceig-mail-composer-card > div small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ceig-mail-composer-card > div strong {
  line-height: 1.18;
}

.ceig-mail-composer-card > div small {
  padding-top: 1px;
}

.ceig-mail-composer-card strong,
.ceig-mail-detail-card strong,
.ceig-settings-profile h3,
.ceig-settings-card strong,
.ceig-settings-grid strong {
  color: #14110c;
}

.ceig-mail-composer-card small,
.ceig-mail-detail-card small,
.ceig-settings-profile p,
.ceig-settings-card span,
.ceig-settings-grid span {
  color: #6d6759;
  font-size: 12px;
  line-height: 1.35;
}

.ceig-mail-composer-card button,
.ceig-mail-actions button,
.ceig-settings-card button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cdbb89;
  border-radius: 999px;
  background: #fffefb;
  color: #14110c;
  font-size: 12px;
  font-weight: 900;
}

.ceig-mail-layout {
  display: grid;
  gap: 10px;
}

.ceig-mail-list {
  order: 2;
  display: grid;
  gap: 8px;
}

.ceig-mail-item {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid #ddd5bf;
  border-radius: 13px;
  background: #fffefb;
}

.ceig-mail-item.active {
  border-color: #b08a36;
  background: #fffaf0;
}

.ceig-mail-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px dashed #cdbb89;
  border-radius: 13px;
  background: #fffaf0;
}

.ceig-mail-empty strong {
  color: #14110c;
  font-size: 14px;
  line-height: 1.2;
}

.ceig-mail-empty span {
  color: #5c5141;
  font-size: 12px;
  line-height: 1.42;
}

.ceig-mail-item div,
.ceig-mail-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ceig-mail-item span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fbf2dc;
  color: #8a6925;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ceig-mail-item p,
.ceig-mail-item small,
.ceig-mail-detail-card p {
  margin: 0;
  color: #4f493f;
  font-size: 12px;
  line-height: 1.4;
}

.ceig-mail-detail-card {
  order: 1;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ceig-mail-detail-head {
  grid-template-columns: auto minmax(0, 1fr);
}

.ceig-mail-detail-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ceig-mail-detail-head > div strong,
.ceig-mail-detail-head > div small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ceig-mail-tracking-strip {
  display: grid;
  gap: 6px;
}

.ceig-mail-tracking-strip span {
  padding: 8px 9px;
  border: 1px solid #eee1bf;
  border-radius: 10px;
  background: #fffaf0;
  color: #6b4d12;
  font-size: 11px;
  font-weight: 800;
}

.ceig-mail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ceig-settings-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.ceig-settings-profile h3,
.ceig-settings-profile p {
  margin: 0;
}

.ceig-settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
}

.ceig-settings-card > div,
.ceig-settings-grid article {
  min-width: 0;
}

.ceig-settings-card > div {
  display: grid;
  gap: 5px;
}

.ceig-settings-card.permissions,
.ceig-settings-card.danger {
  grid-template-columns: 1fr;
}

.ceig-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ceig-settings-grid article {
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 12px;
}

.ceig-settings-grid em {
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fbf2dc;
  color: #8a6925;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.ceig-settings-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ceig-settings-permissions span {
  padding: 7px 9px;
  border: 1px solid #ddd5bf;
  border-radius: 999px;
  background: #fbf8ef;
  color: #302a1e;
  font-size: 11px;
  font-weight: 900;
}

/* CEIG App premium readability and alignment pass */
.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-live-card {
  color: #191510;
  text-rendering: geometricPrecision;
}

.app-dedicated-link.app-session-ready:not(.app-setup-inside-app) .app-workspace-preview {
  gap: 14px;
}

.ceig-social-profile-body h3,
.ceig-social-feed-head h3,
.ceig-social-inbox-head h3,
.ceig-social-thread-header h3,
.ceig-settings-profile h3,
.ceig-mail-screen .app-view-title,
.ceig-settings-screen .app-view-title {
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.ceig-social-profile-body p,
.ceig-social-post p,
.ceig-social-inbox-head p,
.ceig-mail-item p,
.ceig-mail-detail-card p,
.ceig-settings-card span,
.ceig-settings-grid span,
.ceig-chat-message p {
  color: #302a1e;
  font-size: 13px;
  line-height: 1.48;
}

.ceig-social-post-head small,
.ceig-mail-item small,
.ceig-mail-detail-card small,
.ceig-settings-profile p,
.ceig-social-composer-card small,
.ceig-social-case-strip span,
.ceig-media-item span,
.ceig-chat-person small {
  color: #5c5141;
  line-height: 1.42;
}

.ceig-social-profile-card,
.ceig-social-stats,
.ceig-social-composer-card,
.ceig-social-feed,
.ceig-app-panel-card,
.ceig-mail-composer-card,
.ceig-mail-detail-card,
.ceig-settings-profile,
.ceig-settings-card,
.ceig-settings-grid article {
  border-radius: 16px;
}

.ceig-social-actions,
.ceig-social-post-actions,
.ceig-mail-actions,
.ceig-camera-actions,
.ceig-camera-meta {
  align-items: center;
}

.ceig-social-actions button,
.ceig-social-post-actions button,
.ceig-social-feed-head button,
.ceig-social-case-strip button,
.ceig-social-inbox-head button,
.ceig-media-item button,
.ceig-mail-composer-card button,
.ceig-mail-actions button,
.ceig-settings-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.ceig-mail-folders {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.ceig-mail-folders button {
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 9px 3px;
  border: 1px solid #ddd5bf;
  border-radius: 14px;
  background: #fffefb;
  color: #302a1e;
}

.ceig-mail-folders button.active {
  border-color: #14110c;
  background: #14110c;
  color: #f4cf7a;
  box-shadow: inset 0 1px 0 rgba(244,207,122,.45);
}

.ceig-mail-folders strong {
  font-size: 10px;
  line-height: 1.1;
}

.ceig-mail-folders span {
  min-width: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(176,138,54,.14);
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.ceig-mail-summary article {
  align-content: center;
  min-height: 68px;
}

.ceig-mail-summary strong {
  font-size: 22px;
  line-height: 1;
}

.ceig-mail-item {
  gap: 8px;
}

.ceig-mail-item div,
.ceig-mail-detail-head {
  align-items: start;
}

.ceig-mail-item div strong {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
}

.ceig-mail-detail-card {
  border-color: #b08a36;
}

.ceig-mail-tracking-strip {
  grid-template-columns: 1fr;
}

.ceig-settings-grid article {
  align-content: start;
}

.ceig-settings-card > div strong,
.ceig-settings-grid strong {
  display: block;
  margin-bottom: 1px;
  font-size: 15px;
  line-height: 1.22;
}

.ceig-settings-permissions {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.ceig-settings-permissions span {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ceig-settings-card.permissions {
  gap: 14px;
}

.mobile-brand-lockup > div {
  min-width: 0;
}

.ceig-app-install-reminder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 13px;
  border: 1px solid #b08a36;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf0 0%, #fffefb 100%);
  box-shadow: 0 12px 28px rgba(20,17,12,.08);
}

.app-installed-standalone .ceig-app-install-reminder {
  display: none;
}

.ceig-app-install-reminder > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.ceig-app-install-reminder strong {
  color: #14110c;
  font-size: 15px;
  line-height: 1.18;
}

.ceig-app-install-reminder span,
.ceig-app-install-reminder small {
  color: #4f493f;
  font-size: 12px;
  line-height: 1.42;
}

.ceig-app-install-reminder small {
  color: #7a642f;
  font-weight: 750;
}

.ceig-app-install-reminder button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #14110c;
  border-radius: 999px;
  background: #14110c;
  color: #f4cf7a;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  width: 100%;
}

.ceig-app-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.ceig-app-shortcut-grid button {
  min-height: 64px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 9px 5px;
  border: 1px solid #ddd5bf;
  border-radius: 14px;
  background: #fffefb;
  color: #14110c;
  box-shadow: 0 8px 18px rgba(20,17,12,.045);
}

.ceig-app-shortcut-grid strong {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #14110c;
  color: #f4cf7a;
  font-size: 10px;
  font-weight: 950;
}

.ceig-app-shortcut-grid span {
  color: #302a1e;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

/* Stage 13J16: mobile app usability, readable mail and clickable action feedback */
.ceig-app-action-notice {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid #d7bd73;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7e2 0%, #fffefb 100%);
  color: #241d12;
  box-shadow: 0 12px 28px rgba(20,17,12,.075);
}

.ceig-app-action-notice strong {
  color: #14110c;
  font-size: 13px;
  line-height: 1.15;
}

.ceig-app-action-notice span {
  color: #4f493f;
  font-size: 12px;
  line-height: 1.42;
}

.ceig-profile-photo-picker {
  position: relative;
  width: max-content;
  display: inline-grid;
  cursor: pointer;
}

.ceig-profile-photo-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ceig-profile-photo-picker .ceig-social-avatar {
  box-shadow: 0 0 0 2px #fffefb, 0 0 0 4px #cdbb89;
}

.ceig-presence-line {
  color: #8a6925 !important;
  font-weight: 850;
}

.ceig-mail-screen,
.ceig-mail-screen *,
.ceig-app-chat-screen,
.ceig-app-chat-screen * {
  box-sizing: border-box;
  min-width: 0;
}

.ceig-mail-screen {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.ceig-mail-list,
.ceig-mail-detail-card,
.ceig-mail-composer-card,
.ceig-mail-summary,
.ceig-mail-folders {
  width: 100%;
  max-width: 100%;
}

.ceig-mail-item {
  width: 100%;
  max-width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ceig-mail-item span {
  max-width: 100%;
  justify-self: start;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.ceig-mail-item p,
.ceig-mail-item small,
.ceig-mail-detail-card p,
.ceig-mail-tracking-strip span {
  overflow-wrap: anywhere;
}

.ceig-camera-actions label {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.ceig-camera-actions input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ceig-chat-person,
.ceig-chat-composer button,
.ceig-partner-groups button,
.ceig-camera-meta button,
.ceig-app-hero-actions button {
  cursor: pointer;
}

@media (max-width: 560px) {
  .ceig-mail-folders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ceig-mail-folders button:last-child {
    grid-column: 1 / -1;
  }

  .ceig-mail-summary {
    grid-template-columns: 1fr;
  }

  .ceig-mail-summary article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #eee7d6;
  }

  .ceig-mail-summary article:last-child {
    border-bottom: 0;
  }

  .ceig-mail-composer-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ceig-mail-composer-card button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ceig-mail-item div {
    grid-template-columns: 1fr;
  }

  .ceig-mail-actions button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .ceig-social-inbox-head {
    grid-template-columns: 1fr;
  }

.ceig-social-inbox-head button {
    width: 100%;
  }
}

.ceig-app-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  margin: 0 0 10px;
  border: 1px solid #d9c58f;
  border-radius: 999px;
  background: #fffaf0;
  color: #17130c;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(28, 23, 12, 0.08);
}

.ceig-app-back-button:hover,
.ceig-app-back-button:focus-visible {
  background: #f6edd8;
  outline: 2px solid rgba(184, 145, 65, 0.25);
}

button.ceig-app-file-row,
button.ceig-app-person-row,
button.ceig-app-module,
.ceig-settings-grid button {
  width: 100%;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.ceig-app-module {
  align-items: flex-start;
}

.ceig-settings-grid button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #eadfca;
  border-radius: 18px;
  background: #fffdf8;
  padding: 16px;
  min-height: 132px;
}

.ceig-settings-grid button:hover,
.ceig-settings-grid button:focus-visible,
button.ceig-app-file-row:hover,
button.ceig-app-person-row:hover,
button.ceig-app-module:hover {
  border-color: #c8a861;
  box-shadow: 0 16px 30px rgba(33, 28, 16, 0.1);
  outline: none;
}

.ceig-mail-actions .danger {
  border-color: #d6b8ad;
  background: #fff5f1;
  color: #8c2b1c;
}

.ceig-settings-profile,
.ceig-settings-grid,
.ceig-settings-grid button {
  max-width: 100%;
  overflow: hidden;
}

.ceig-settings-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.ceig-settings-profile > div {
  min-width: 0;
}

.ceig-settings-profile input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ceig-settings-profile .app-view-title,
.ceig-settings-profile p,
.ceig-settings-profile small,
.ceig-settings-grid strong,
.ceig-settings-grid span,
.ceig-settings-grid small {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ceig-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.ceig-mail-actions .danger:hover,
.ceig-mail-actions .danger:focus-visible {
  background: #ffe9e1;
  border-color: #bb6b58;
}

/* Stage 13J18: CEIG App professional mobile logic */
.profile-avatar.has-photo,
.ceig-social-avatar.has-photo,
.ceig-social-avatar.photo {
  overflow: hidden;
  padding: 0;
}

.profile-avatar.has-photo img,
.ceig-social-avatar.has-photo img,
.ceig-social-avatar.photo img,
.ceig-social-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.ceig-mail-screen.pro,
.ceig-app-chat-screen.pro,
.ceig-social-media-screen.pro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ceig-mail-topbar,
.ceig-social-inbox-head,
.compose-head,
.ceig-mail-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ceig-mail-topbar > div,
.ceig-social-inbox-head > div,
.compose-head > div,
.ceig-mail-detail-head > div {
  min-width: 0;
}

.ceig-mail-topbar p,
.ceig-social-inbox-head p,
.compose-head small,
.ceig-mail-detail-head small {
  margin: 4px 0 0;
  color: #655d4d;
  line-height: 1.35;
}

.ceig-mail-topbar .primary,
.ceig-mail-compose-form .primary,
.ceig-chat-composer.pro .primary,
.ceig-camera-actions.pro .primary {
  border: 1px solid #14110c;
  background: #14110c;
  color: #f0d38a;
}

.ceig-mail-folders.pro,
.mail-context-row,
.ceig-mail-tracking-strip.pro,
.ceig-mail-actions.pro,
.compose-actions,
.chat-attach-row,
.ceig-camera-actions.pro,
.ceig-camera-meta.pro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ceig-mail-folders.pro {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0 0 2px;
  scrollbar-width: thin;
}

.ceig-mail-folders.pro button,
.mail-context-row span,
.ceig-mail-tracking-strip.pro span,
.ceig-mail-actions.pro button,
.compose-actions button,
.compose-head button,
.chat-attach-row label,
.ceig-camera-actions.pro label,
.ceig-camera-meta.pro button,
.file-chip {
  min-height: 36px;
  border: 1px solid #ded2bd;
  border-radius: 999px;
  background: #fffdf8;
  color: #191714;
  font-weight: 850;
  padding: 8px 12px;
  cursor: pointer;
}

.ceig-mail-folders.pro button {
  flex: 0 0 auto;
  display: inline-flex;
  justify-content: center;
  gap: 8px;
}

.ceig-mail-folders.pro button.active,
.ceig-camera-meta.pro button.active {
  border-color: #14110c;
  background: #14110c;
  color: #f0d38a;
}

.ceig-mail-folders.pro span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(210, 181, 112, 0.2);
  color: inherit;
  font-size: 12px;
}

.ceig-mail-layout.pro,
.ceig-chat-layout.pro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.ceig-mail-list.pro,
.ceig-chat-people.pro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ceig-mail-thread,
.ceig-chat-person,
.ceig-partner-groups.pro button {
  width: 100%;
  min-width: 0;
  border: 1px solid #e4ddcf;
  border-radius: 16px;
  background: #fffefb;
  color: #171514;
  text-align: left;
  box-shadow: 0 10px 24px rgba(32, 28, 18, 0.05);
}

.ceig-mail-thread {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.ceig-mail-thread.active,
.ceig-chat-person.active {
  border-color: #c8a861;
  background: #fff8e8;
  box-shadow: 0 14px 34px rgba(50, 37, 10, 0.12);
}

.mail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7bda7;
}

.ceig-mail-thread.unread .mail-dot {
  background: #ba8624;
}

.mail-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mail-main strong,
.mail-main small,
.mail-main em,
.ceig-mail-detail-head strong,
.ceig-mail-detail-head small,
.ceig-chat-person strong,
.ceig-chat-person small,
.ceig-chat-person em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ceig-mail-thread.unread strong {
  font-weight: 950;
}

.mail-main small,
.mail-main em,
.mail-state,
.ceig-chat-person small,
.ceig-chat-person em {
  color: #625b4e;
  font-size: 12px;
  line-height: 1.25;
}

.mail-state {
  justify-self: end;
  border: 1px solid #e2d6be;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff8e8;
}

.ceig-mail-reader,
.ceig-mail-compose-form,
.ceig-chat-thread-card.pro,
.ceig-camera-capture.pro {
  min-width: 0;
  border: 1px solid #e2dacb;
  border-radius: 18px;
  background: #fffdf8;
  padding: 14px;
  box-shadow: 0 16px 34px rgba(32, 28, 18, 0.07);
  overflow: hidden;
}

.ceig-mail-compose-form {
  display: grid;
  gap: 12px;
}

.ceig-mail-compose-form label {
  display: grid;
  gap: 6px;
  color: #24201a;
  font-weight: 850;
}

.ceig-mail-compose-form input,
.ceig-mail-compose-form select,
.ceig-mail-compose-form textarea,
.ceig-chat-composer.pro input,
.ceig-chat-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ded2bd;
  border-radius: 14px;
  background: #fff;
  color: #151310;
  padding: 12px;
  font: inherit;
}

.ceig-mail-compose-form textarea {
  min-height: 112px;
  resize: vertical;
}

.mail-body {
  margin: 0;
  color: #1e1b16;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ceig-mail-empty {
  display: grid;
  gap: 6px;
  border: 1px dashed #ded2bd;
  border-radius: 16px;
  padding: 18px;
  color: #625b4e;
  background: #fffaf1;
}

.file-chip,
.chat-attach-row label,
.ceig-camera-actions.pro label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-chip input,
.chat-attach-row input,
.ceig-camera-actions.pro input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}

.ceig-chat-person {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.ceig-chat-avatar {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: #f2eadc;
  color: #17130c;
  font-weight: 950;
}

.ceig-chat-avatar i {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b9b1a1;
}

.ceig-chat-avatar i.on {
  background: #1f8c55;
}

.ceig-presence-line {
  color: #8a6925 !important;
  font-weight: 850;
}

.ceig-chat-messages {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding-right: 2px;
}

.ceig-chat-composer.pro {
  display: grid;
  gap: 8px;
  border-top: 1px solid #ece2d0;
  margin-top: 12px;
  padding-top: 12px;
}

.ceig-social-thread-header.compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ceig-social-thread-header.compact > div {
  min-width: 0;
}

.ceig-pending-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ceig-pending-files span {
  border: 1px solid #e2d5bd;
  border-radius: 999px;
  background: #fff8e8;
  color: #332813;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
}

.ceig-media-timeline.pro {
  display: grid;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
}

.ceig-media-item.pro {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e2dacb;
  border-radius: 16px;
  padding: 10px;
  background: #fffefb;
}

.ceig-media-thumb {
  display: grid;
  width: 64px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #17130c;
  color: #f0d38a;
  font-size: 11px;
  font-weight: 950;
}

.ceig-media-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ceig-media-item.pro div:nth-child(2) {
  min-width: 0;
}

.ceig-media-item.pro strong,
.ceig-media-item.pro span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ceig-mail-layout.pro,
  .ceig-chat-layout.pro {
    grid-template-columns: 1fr;
  }

  .ceig-mail-topbar,
  .ceig-social-inbox-head {
    align-items: flex-start;
  }

  .ceig-mail-thread {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .mail-state {
    grid-column: 2;
    justify-self: start;
  }

  .ceig-media-item.pro {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .ceig-media-thumb {
    width: 56px;
    height: 48px;
  }

  .ceig-media-item.pro button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .ceig-settings-grid {
    grid-template-columns: 1fr;
  }

  .ceig-chat-person {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .ceig-chat-person em {
    grid-column: 2;
    justify-self: start;
  }

  .ceig-social-thread-header.compact {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ceig-social-thread-header.compact button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chat-attach-row label,
  .ceig-mail-actions.pro button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
}

.production-rc-home,
.stage8g13-rfq-wizard,
.production-rc-replies {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.production-rc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.production-rc-head h2,
.production-rc-head h3 {
  margin: 8px 0 6px;
}

.production-rc-head p {
  margin: 0;
  max-width: 780px;
}

.production-rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.production-rc-tile {
  min-height: 160px;
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #101828;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
}

.production-rc-tile span {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f5efe2;
  color: #6b4a13;
  font-size: 12px;
  font-weight: 700;
}

.production-rc-tile strong {
  font-size: 18px;
}

.production-rc-tile p,
.production-rc-checks p {
  margin: 0;
  color: #475467;
}

.production-rc-checks,
.stage8g13-wizard-steps,
.stage8g13-project-grid,
.production-rc-reply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.production-rc-checks article,
.stage8g13-wizard-steps article,
.stage8g13-project-grid article,
.stage8g13-language-card,
.stage8g13-preview-columns article,
.production-rc-reply-grid article {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.stage8g13-wizard-steps article.active,
.stage8g13-project-grid article.active {
  border-color: rgba(181, 138, 55, 0.45);
  background: #fffaf0;
}

.stage8g13-language-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stage8g13-language-card > div:last-child {
  display: grid;
  gap: 5px;
  min-width: 240px;
}

.stage8g13-language-card .ok {
  color: #067647;
  font-weight: 700;
}

.stage8g13-language-card .warning {
  color: #b42318;
  font-weight: 700;
}

/* Stage 8G14: production RC readability and security UX pass */
.production-rc-home,
.stage8g13-rfq-wizard,
.production-rc-replies,
.stage6-mail-center,
.public-cms-editor,
.mail-config-panel {
  color: #101828;
}

.production-rc-head,
.production-rc-tile,
.production-rc-checks article,
.stage8g13-wizard-steps article,
.stage8g13-project-grid article,
.stage8g13-language-card,
.stage8g13-preview-columns article,
.production-rc-reply-grid article,
.stage6-mail-center .stage6-hero,
.stage6-mail-center .stage6-metrics article {
  border-color: rgba(17, 24, 39, 0.14);
  color: #101828;
}

.production-rc-head p,
.production-rc-tile p,
.production-rc-checks p,
.stage8g13-rfq-wizard p,
.production-rc-replies p,
.stage6-mail-center p,
.public-cms-editor p,
.mail-config-panel p {
  color: #344054;
  line-height: 1.55;
}

.production-rc-tile strong,
.production-rc-checks strong,
.stage8g13-wizard-steps strong,
.stage8g13-project-grid strong,
.stage8g13-language-card strong,
.stage8g13-preview-columns h4,
.production-rc-reply-grid strong {
  color: #101828;
}

.stage8g13-preview-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
}

.stage8g13-preview-columns pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #101828;
  background: #fffdf8;
  border: 1px solid rgba(181, 138, 55, 0.24);
  border-radius: 10px;
  padding: 12px;
}

.stage8g13-preview-columns article.internal {
  background: #fff7ed;
  border-color: rgba(194, 65, 12, 0.22);
}

.stage8g13-language-card .warning,
.sandbox-login-note.warning {
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid rgba(194, 65, 12, 0.24);
  border-radius: 10px;
  padding: 10px;
}

.stage8g14-primary-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(181, 138, 55, 0.28);
  border-radius: 10px;
  background: #fffaf0;
  padding: 12px 14px;
}

.stage8g14-primary-action strong {
  color: #101828;
}

.stage8g14-primary-action small {
  color: #475467;
}

@media (max-width: 860px) {
  .stage8g13-preview-columns {
    grid-template-columns: 1fr;
  }

  .stage8g13-language-card,
  .production-rc-head {
    display: grid;
  }
}

.stage8g13-preview-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 12px;
}

.stage8g13-preview-columns pre {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #101828;
}

.stage8g13-preview-columns .internal {
  background: #fffbeb;
}

.production-rc-reply-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  margin-top: 10px;
}

.production-rc-reply-list button {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  color: #101828;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.production-rc-reply-list small {
  color: #667085;
}

@media (max-width: 860px) {
  .production-rc-head,
  .stage8g13-language-card {
    display: grid;
  }

  .stage8g13-preview-columns {
    grid-template-columns: 1fr;
  }
}

img.public-image-missing {
  opacity: 0;
  visibility: hidden;
}

.brand[data-image-missing="true"],
.footer-brand[data-image-missing="true"] {
  min-width: 130px;
  min-height: 28px;
}

.brand[data-image-missing="true"]::after,
.footer-brand[data-image-missing="true"]::after {
  content: "CEIG";
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
}

.hero-media[data-image-missing="true"],
.market-visual[data-image-missing="true"] {
  background:
    linear-gradient(135deg, rgba(10, 12, 14, 0.08), rgba(191, 164, 101, 0.16)),
    var(--surface-soft);
  border: 1px solid rgba(191, 164, 101, 0.28);
}

.stage8g15-simple-shell .portal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.stage8g15-simple-topbar {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.stage8g15-simple-topbar .portal-tabs {
  flex: 1;
  min-width: 0;
}

.stage8g15-simple-topbar .portal-tabs button {
  min-height: 46px;
  color: #101828;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.14);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

.stage8g15-simple-topbar .portal-tabs button.active {
  color: #090b0f;
  background: linear-gradient(180deg, #f7dc9d, #c99b3d);
  border-color: #8a5d13;
}

.stage8g15-advanced-button {
  flex: 0 1 210px;
  min-width: 0;
  max-width: 210px;
  border-color: rgba(181, 138, 55, 0.28);
  background: #fffaf0;
  color: #101828;
  white-space: normal;
}

.stage8g15-advanced-button span,
.stage8g15-advanced-button strong {
  display: block;
  color: #101828;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.stage8g20-advanced-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid rgba(181, 138, 55, 0.32);
  border-radius: 14px;
  background: #fff8e8;
  color: #101828;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.08);
}

.stage8g20-advanced-warning h3 {
  margin: 6px 0 4px;
  color: #101828;
}

.stage8g20-advanced-warning p {
  margin: 0;
  color: #344054;
}

.stage8g20-simple-section {
  display: grid;
  gap: 16px;
  color: #101828;
}

.stage8g20-simple-section > .board-column {
  background: #ffffff;
  color: #101828;
  border-color: rgba(16, 24, 40, 0.12);
}

.stage8g20-simple-section > .board-column p {
  color: #344054;
}

.stage8g15-shell,
.stage8g15-action-queue,
.stage8g15-hub,
.stage8g15-wizard,
.stage8g15-cms-wizard,
.stage8g15-role-tasks {
  color: #101828;
}

.stage8g15-focus-card,
.stage8g15-action-queue,
.stage8g15-hub,
.stage8g15-wizard,
.stage8g15-cms-wizard,
.stage8g15-role-tasks {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.06);
}

.stage8g15-focus-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 18px;
}

.stage8g15-focus-card h3,
.stage8g15-section-head h3,
.stage8g15-role-tasks h3 {
  margin: 6px 0 4px;
  color: #0b1220;
  letter-spacing: 0;
}

.stage8g15-focus-card p,
.stage8g15-section-head p,
.stage8g15-role-tasks p {
  margin: 0;
  color: #475467;
}

.stage8g15-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.stage8g15-action-queue,
.stage8g15-hub,
.stage8g15-wizard,
.stage8g15-cms-wizard {
  margin: 16px 0;
  padding: 16px;
}

.stage8g15-queue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stage8g15-queue-column {
  min-width: 0;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
}

.stage8g15-queue-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stage8g15-queue-column h4,
.stage8g15-case-card h4,
.stage8g15-hub h4,
.stage8g15-cms-steps h4 {
  margin: 0;
  color: #101828;
}

.stage8g15-queue-column header strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #101828;
  color: #fff;
}

.stage8g15-case-card {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #fff;
  padding: 11px;
}

.stage8g15-case-card p,
.stage8g15-case-card small {
  margin: 0;
  color: #475467;
}

.stage8g15-case-card .small-button {
  justify-self: start;
}

.stage8g15-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stage8g15-hub-grid article,
.stage8g15-cms-current {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.stage8g15-hub-grid button {
  width: 100%;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #fff;
  color: #101828;
  padding: 10px;
  text-align: left;
}

.stage8g15-hub-grid p {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  padding-bottom: 8px;
}

.stage8g15-hub-grid span {
  color: #667085;
}

.stage8g15-wizard-grid,
.stage8g15-cms-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stage8g15-wizard-grid article,
.stage8g15-cms-steps article {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.stage8g15-wizard-grid article.active,
.stage8g15-cms-steps article:first-child {
  border-color: rgba(181, 138, 55, 0.34);
  background: #fffaf0;
}

.stage8g15-wizard-grid strong,
.stage8g15-cms-steps strong {
  color: #b58a37;
  font-size: 0.86rem;
}

.stage8g15-cms-current {
  display: grid;
  gap: 4px;
}

.stage8g15-cms-current span,
.stage8g15-cms-current small {
  color: #667085;
}

.stage8g15-role-tasks {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  margin: 12px 0 16px;
  padding: 14px;
}

.stage8g15-role-tasks > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.stage8g15-role-tasks button {
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 10px;
  background: #fff;
  color: #101828;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
}

.stage8g15-role-tasks button:hover,
.stage8g15-hub-grid button:hover,
.stage8g15-case-card:hover {
  border-color: rgba(181, 138, 55, 0.36);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.stage8g17-role-start {
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  border-color: rgba(181, 138, 55, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
}

.stage8g17-role-start .status-pill {
  background: #101828;
  color: #fff;
}

.stage8g17-primary-actions {
  align-content: start;
}

.stage8g17-primary-actions button {
  min-height: 48px;
  border-color: rgba(181, 138, 55, 0.24);
  background: #fffaf0;
}

.stage8g17-primary-actions button:first-child {
  background: #101828;
  color: #fff;
}

.stage8g17-mini-checklist {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid rgba(181, 138, 55, 0.18);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.stage8g17-mini-checklist strong,
.stage8g17-plain-scope span {
  color: #101828;
  font-size: 0.86rem;
  font-weight: 800;
}

.stage8g17-mini-checklist ul,
.stage8g17-plain-scope ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.stage8g17-mini-checklist li,
.stage8g17-plain-scope li,
.stage8g17-plain-scope p {
  color: #475467;
  line-height: 1.45;
}

.stage8g17-plain-scope {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stage8g17-plain-scope article {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.stage8g17-plain-scope p {
  margin: 0;
}

.external-layman-shell[data-stage8g17b-first-screen="1"] {
  gap: 12px;
}

.stage8g17b-external-topbar {
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
  padding: 12px 14px;
}

.stage8g17b-external-topbar > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stage8g17b-external-topbar strong {
  color: #0b1220;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}

.stage8g17b-external-topbar span {
  color: #b58a37;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stage8g17b-external-topbar small {
  color: #667085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage8g17b-first-screen {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 0;
  border-color: rgba(181, 138, 55, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.72), #ffffff 42%),
    #ffffff;
}

.stage8g17b-first-screen h3 {
  font-size: 2rem;
  line-height: 1.08;
}

.stage8g17b-first-screen > div:first-child p {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.55;
}

.stage8g17b-first-screen .stage8g17-primary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.9fr));
  gap: 10px;
}

.stage8g17b-first-screen .stage8g17-primary-actions button {
  min-height: 52px;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}

.stage8g17b-first-screen .stage8g17-primary-actions button.primary {
  border-color: #101828;
  background: #101828;
  color: #fff;
}

.stage8g17b-scope-summary,
.stage8g17b-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stage8g17b-scope-summary article,
.stage8g17b-detail-grid article {
  min-width: 0;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.stage8g17b-scope-summary strong,
.stage8g17b-detail-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #101828;
  font-weight: 900;
}

.stage8g17b-scope-summary ul,
.stage8g17b-detail-grid ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.stage8g17b-scope-summary li,
.stage8g17b-detail-grid li,
.stage8g17b-detail-grid p {
  color: #475467;
  line-height: 1.45;
}

.stage8g17b-details {
  border: 1px solid rgba(181, 138, 55, 0.22);
  border-radius: 10px;
  background: #fffdf7;
  padding: 10px 12px;
}

.stage8g17b-details summary {
  color: #101828;
  cursor: pointer;
  font-weight: 900;
}

.stage8g17b-details[open] summary {
  margin-bottom: 10px;
}

.stage8g16-role-visibility {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.stage8g16-role-visibility article,
.stage8g16-case360-truth,
.stage8g16-module-scope {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.stage8g16-role-visibility article {
  display: grid;
  gap: 8px;
  background: #f8fafc;
}

.stage8g16-role-visibility ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.stage8g16-role-visibility p,
.stage8g16-role-visibility small,
.stage8g16-truth-grid p,
.stage8g16-truth-grid small,
.stage8g16-router-preview span,
.stage8g16-module-scope p,
.stage8g16-module-scope small {
  margin: 0;
  color: #475467;
}

.stage8g16-case360-truth,
.stage8g16-module-scope {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.stage8g16-truth-grid,
.stage8g16-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stage8g16-truth-grid article,
.stage8g16-permission-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  padding: 11px;
}

.stage8g16-truth-grid strong,
.stage8g16-permission-grid strong,
.stage8g16-router-preview h4 {
  margin: 0;
  color: #101828;
}

.stage8g16-truth-grid small,
.stage8g16-router-preview span {
  font-size: 0.82rem;
}

.stage8g16-router-preview {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
  padding-top: 12px;
}

.stage8g16-router-preview p {
  display: grid;
  gap: 3px;
  margin: 0;
  border: 1px solid rgba(181, 138, 55, 0.22);
  border-radius: 10px;
  background: #fffaf0;
  padding: 10px;
}

@media (max-width: 1120px) {
  .stage8g15-queue-grid,
  .stage8g15-wizard-grid,
  .stage8g15-cms-steps,
  .stage8g16-truth-grid,
  .stage8g16-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .stage8g15-simple-topbar,
  .stage8g15-focus-card,
  .stage8g15-section-head,
  .stage8g15-role-tasks {
    display: grid;
  }

  .stage8g15-advanced-button {
    width: 100%;
  }

  .stage8g15-queue-grid,
  .stage8g15-hub-grid,
  .stage8g15-wizard-grid,
  .stage8g15-cms-steps,
  .stage8g17-plain-scope,
  .stage8g16-role-visibility,
  .stage8g16-truth-grid,
  .stage8g16-permission-grid {
    grid-template-columns: 1fr;
  }
  .stage8g17b-external-topbar {
    align-items: flex-start;
    gap: 10px;
    padding: 11px;
  }
  .stage8g17b-external-topbar .small-button {
    min-width: auto;
    white-space: nowrap;
  }
  .stage8g17b-first-screen {
    padding: 13px;
  }
  .stage8g17b-first-screen h3 {
    font-size: 1.55rem;
  }
  .stage8g17b-first-screen .stage8g17-primary-actions,
  .stage8g17b-scope-summary,
  .stage8g17b-detail-grid {
    grid-template-columns: 1fr;
  }
  .stage8g17b-first-screen .stage8g17-primary-actions button {
    min-height: 48px;
  }
}

.stage8g18a-demo-login,
.stage8g18a-demo-hub,
.stage8g18a-demo-case,
.stage8g18a-demo-files,
.stage8g18a-demo-message {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f6ef 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 18px;
}

.stage8g18a-demo-login h3,
.stage8g18a-demo-hub h3,
.stage8g18a-demo-case h3,
.stage8g18a-demo-files h3,
.stage8g18a-demo-message h3 {
  color: #111827;
  letter-spacing: 0;
}

.stage8g18a-demo-login article,
.stage8g18a-demo-message-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(191, 145, 69, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
}

.stage8g18a-demo-shell {
  background: #f7f5ef;
}

.stage8g18a-demo-topbar {
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #111827;
  color: #fff;
}

.stage8g18a-demo-topbar strong {
  color: #f5d28a;
  font-size: 1.05rem;
}

.stage8g18a-demo-topbar span,
.stage8g18a-demo-topbar small {
  color: rgba(255, 255, 255, 0.86);
}

.stage8g18a-demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage8g18a-demo-tabs button {
  border: 1px solid rgba(245, 210, 138, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
}

.stage8g18a-demo-tabs button.active {
  background: #f5d28a;
  color: #111827;
}

.stage8g18a-demo-grid,
.stage8g18a-demo-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.stage8g18a-demo-grid article,
.stage8g18a-demo-timeline article {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
}

.stage8g18a-demo-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stage8g18a-demo-timeline span {
  color: #9b6a16;
  font-weight: 800;
}

.stage8g18a-file-list,
.stage8g18a-demo-role-list {
  display: grid;
  gap: 10px;
}

.stage8g18a-file-list button,
.stage8g18a-demo-role-list button {
  display: grid;
  gap: 3px;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  padding: 12px;
}

.stage8g18a-demo-role-list button.active {
  border-color: #b99145;
  box-shadow: inset 0 0 0 1px rgba(185, 145, 69, 0.5);
}

.stage8g18a-demo-link-box {
  min-height: 42px;
  overflow-wrap: anywhere;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  color: #334155;
  font-size: 0.86rem;
}

.stage8g18a-demo-preview .stage8g17b-first-screen,
.stage8g18a-demo-preview .stage8g18a-demo-case {
  box-shadow: none;
}

@media (max-width: 760px) {
  .stage8g18a-demo-topbar {
    align-items: flex-start;
  }

  .stage8g18a-demo-tabs,
  .stage8g18a-demo-grid,
  .stage8g18a-demo-hub-grid,
  .stage8g18a-demo-timeline {
    grid-template-columns: 1fr;
  }
}

/* 8G19D final readability and contrast layer.
   This block intentionally stays at the end of the stylesheet so it can repair
   contrast without changing CEIG runtime logic or panel structure. */
:root {
  --ceig-bg-dark: #070908;
  --ceig-panel-dark: #101615;
  --ceig-panel-dark-2: #17201e;
  --ceig-card-light: #ffffff;
  --ceig-card-soft: #f7f5ee;
  --ceig-text-dark: #111827;
  --ceig-text-mid: #374151;
  --ceig-text-muted: #4b5563;
  --ceig-text-light: #fffaf0;
  --ceig-muted-light: #e7ddd0;
  --ceig-muted-dark: #4b5563;
  --ceig-border-light: #d6dbe1;
  --ceig-border-dark: rgba(240, 193, 104, 0.32);
  --ceig-accent: #c49233;
  --ceig-accent-strong: #f1c76f;
  --ceig-warning: #a16207;
  --ceig-danger: #b42318;
  --ceig-success: #17633a;
  --ceig-focus: 0 0 0 3px rgba(196, 146, 51, 0.32);
}

body {
  color: var(--ceig-text-light);
  background: var(--ceig-bg-dark);
}

body,
.portal-board,
.portal-shell,
.portal-login,
.portal-grid,
.board-column,
.dashboard-card,
.system-card,
.audit-card,
.offer-builder,
.factory-settings,
.crm-card,
.case360-main,
.case360-list,
.stage6-mail-center,
.stage6-detail,
.stage6-list,
.stage6-history,
.stage6-send-form,
.stage6-inbound-form,
.stage6-rfq-review,
.demo-access,
.backend-status-strip {
  text-rendering: geometricPrecision;
}

.site-header,
.portal-shell,
.login-card,
.portal-board,
.board-column,
.dashboard-card,
.partner-access-card,
.offer-builder,
.audit-card,
.system-card,
.factory-settings,
.crm-card,
.pipeline-column,
.order-item,
.material-card,
.stage6-mail-center,
.stage6-detail,
.stage6-list,
.stage6-history,
.stage6-send-form,
.stage6-inbound-form,
.stage6-rfq-review,
.case360-main,
.case-checklist-panel,
.notification-card,
.sharing-card,
.demo-access {
  color: var(--ceig-text-light);
}

.login-card,
.board-column,
.dashboard-card,
.partner-access-card,
.offer-builder,
.audit-card,
.system-card,
.factory-settings,
.crm-card,
.pipeline-column,
.order-item,
.material-card,
.stage6-list,
.stage6-detail,
.stage6-history,
.stage6-send-form,
.stage6-inbound-form,
.stage6-rfq-review,
.case-checklist-panel,
.notification-card,
.sharing-card,
.demo-access {
  border-color: var(--ceig-border-dark);
  background: linear-gradient(180deg, rgba(23, 32, 30, 0.98), rgba(7, 9, 8, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.login-card p,
.dashboard-card p,
.board-column p,
.system-card p,
.audit-card p,
.partner-access-card p,
.stage6-mail-center p,
.stage6-detail p,
.stage6-list p,
.stage6-history p,
.stage6-send-form p,
.stage6-inbound-form p,
.stage6-rfq-review p,
.case360-main p,
.case360-list-item small,
.case-checklist-panel p,
.notification-card p,
.sharing-card p,
.demo-access p,
.backend-status-strip,
.presence-strip small,
.presence-list span,
.password-step p {
  color: var(--ceig-muted-light);
}

.login-card h3,
.portal-shell h3,
.dashboard-card h3,
.system-card h3,
.audit-card h3,
.stage6-detail h3,
.stage6-history h3,
.stage6-rfq-review h4,
.case360-hero h3,
.case-checklist-panel h3,
.demo-access h4,
.portal-shell strong,
.dashboard-card strong,
.system-card strong,
.stage6-detail strong,
.stage6-rfq-review strong,
.case360-main strong {
  color: var(--ceig-accent-strong);
}

.stage8g18a-demo-login,
.stage8g18a-demo-hub,
.stage8g18a-demo-case,
.stage8g18a-demo-files,
.stage8g18a-demo-message,
.stage8g18a-demo-grid article,
.stage8g18a-demo-timeline article,
.stage8g18a-demo-message-card,
.stage8g18a-demo-link-box,
.stage8g17b-first-screen,
.stage8g17b-scope-summary,
.stage8g17b-detail-grid article,
.stage8g17b-primary-actions button,
.stage8g16-truth-grid article,
.stage8g16-permission-grid article,
.stage8g16-router-preview p,
.stage8g15-queue-grid article,
.stage8g15-hub-grid article,
.stage8g15-wizard-grid article,
.stage8g15-cms-steps article,
.stage6-rfq-pdf-preview,
.stage6-rfq-files-preview,
.stage6-rfq-doc-card,
.stage6-rfq-package-link,
.stage6-bulk-review,
.stage6-bulk-review-list article,
.stage6-mail-card,
.mail-tracking-panel,
.source-file-card,
.document-card,
.case360-metrics article,
.case360-hero,
.case360-sla,
.case-checklist label,
.market-route-card,
.market-card,
.capability-item,
.sector-panel,
.inquiry-panel .system-form,
.micro-b2b-benefits,
.micro-b2b-info-card,
.micro-b2b-form,
.factory-partner-application {
  border-color: var(--ceig-border-light);
  background: var(--ceig-card-light);
  color: var(--ceig-text-dark);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.stage8g18a-demo-login :where(h1, h2, h3, h4, strong),
.stage8g18a-demo-hub :where(h1, h2, h3, h4, strong),
.stage8g18a-demo-case :where(h1, h2, h3, h4, strong),
.stage8g18a-demo-files :where(h1, h2, h3, h4, strong),
.stage8g18a-demo-message :where(h1, h2, h3, h4, strong),
.stage8g17b-first-screen :where(h1, h2, h3, h4, strong),
.stage8g16-truth-grid :where(h1, h2, h3, h4, strong),
.stage8g16-permission-grid :where(h1, h2, h3, h4, strong),
.stage8g15-queue-grid :where(h1, h2, h3, h4, strong),
.stage8g15-hub-grid :where(h1, h2, h3, h4, strong),
.stage8g15-wizard-grid :where(h1, h2, h3, h4, strong),
.stage8g15-cms-steps :where(h1, h2, h3, h4, strong),
.stage6-rfq-pdf-preview :where(h1, h2, h3, h4, strong),
.stage6-rfq-files-preview :where(h1, h2, h3, h4, strong),
.stage6-rfq-doc-card strong,
.stage6-rfq-package-link strong,
.stage6-bulk-review :where(h1, h2, h3, h4, strong),
.stage6-mail-card strong,
.mail-tracking-panel :where(h1, h2, h3, h4, strong),
.source-file-card strong,
.document-card strong,
.case360-metrics strong,
.case360-hero :where(h1, h2, h3, h4, strong),
.case360-sla strong,
.case-checklist label strong,
.market-route-card :where(h1, h2, h3, h4, strong),
.market-card :where(h1, h2, h3, h4, strong),
.capability-item :where(h1, h2, h3, h4, strong),
.sector-panel :where(h1, h2, h3, h4, strong),
.micro-b2b-benefits :where(h1, h2, h3, h4, strong),
.micro-b2b-info-card :where(h1, h2, h3, h4, strong),
.factory-partner-application :where(h1, h2, h3, h4, strong) {
  color: var(--ceig-text-dark);
}

.stage8g18a-demo-login :where(p, small, span, li),
.stage8g18a-demo-hub :where(p, small, span, li),
.stage8g18a-demo-case :where(p, small, span, li),
.stage8g18a-demo-files :where(p, small, span, li),
.stage8g18a-demo-message :where(p, small, span, li),
.stage8g17b-first-screen :where(p, small, span, li),
.stage8g16-truth-grid :where(p, small, span, li),
.stage8g16-permission-grid :where(p, small, span, li),
.stage8g15-queue-grid :where(p, small, span, li),
.stage8g15-hub-grid :where(p, small, span, li),
.stage8g15-wizard-grid :where(p, small, span, li),
.stage8g15-cms-steps :where(p, small, span, li),
.stage6-rfq-pdf-preview :where(p, small, span, li),
.stage6-rfq-files-preview :where(p, small, span, li),
.stage6-rfq-doc-card small,
.stage6-rfq-package-link :where(p, small, span),
.stage6-bulk-review :where(p, small, span, li),
.stage6-mail-card :where(p, small, span),
.mail-tracking-panel :where(p, small, span),
.source-file-card :where(p, small, span),
.document-card :where(p, small, span),
.case360-metrics :where(p, small, span),
.case360-hero :where(p, small, span, li),
.case360-sla :where(p, small, span),
.case-checklist label :where(p, small, span),
.market-route-card :where(p, small, span, li),
.market-card :where(p, small, span, li),
.capability-item :where(p, small, span, li),
.sector-panel :where(p, small, span, li),
.micro-b2b-benefits :where(p, small, span, li),
.micro-b2b-info-card :where(p, small, span, li),
.factory-partner-application :where(p, small, span, li) {
  color: var(--ceig-text-mid);
}

.stage6-rfq-pdf-preview pre,
.stage6-safe-preview,
.stage6-internal-note {
  border-color: #cfd7df;
  background: #f8fafc;
  color: var(--ceig-text-dark);
}

.stage6-rfq-package-link a,
.stage8g18a-demo-link-box a,
.document-card a,
.source-file-card a {
  color: #7c4a03;
  font-weight: 800;
}

label,
.system-form label,
.stage6-detail label,
.stage6-send-form label,
.stage6-inbound-form label,
.stage6-approval-check,
.case-checklist label,
.file-field,
.transfer-field {
  color: inherit;
}

label > span,
.system-form label > span,
.stage6-detail label > span,
.stage6-send-form label > span,
.stage6-inbound-form label > span,
.file-field > span,
.transfer-field > span {
  color: currentColor;
  font-weight: 800;
}

input,
textarea,
select {
  border: 1px solid #9aa4b2;
  background: #ffffff;
  color: var(--ceig-text-dark);
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--ceig-focus);
  border-color: var(--ceig-accent);
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled,
.button:disabled {
  opacity: 0.66;
  color: #4b5563;
  background: #e5e7eb;
  border-color: #cbd5e1;
}

.button,
button,
.small-button,
.text-button {
  letter-spacing: 0;
}

.button-primary,
.small-button.primary,
button.primary,
.stage8g18a-demo-tabs button.active,
.portal-tabs button.active,
.sector-tabs button.active,
.role-picker button.active,
.offer-targets button.active {
  color: #090b0f;
  background: linear-gradient(180deg, #f6d68a, var(--ceig-accent));
  border-color: #8a5d13;
  box-shadow: 0 10px 24px rgba(139, 92, 20, 0.22);
}

.button-ghost,
.small-button,
.text-button,
.portal-tabs button,
.sector-tabs button,
.role-picker button,
.offer-targets button,
.demo-access-list button,
.stage8g18a-file-list button,
.stage8g18a-demo-role-list button {
  color: var(--ceig-text-light);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(240, 193, 104, 0.48);
}

.button-ghost:hover,
.small-button:hover,
.text-button:hover,
.portal-tabs button:hover,
.sector-tabs button:hover,
.role-picker button:hover,
.offer-targets button:hover,
.demo-access-list button:hover,
.stage8g18a-file-list button:hover,
.stage8g18a-demo-role-list button:hover {
  color: #fff;
  background: rgba(240, 193, 104, 0.16);
  border-color: rgba(246, 214, 138, 0.74);
}

.stage8g18a-file-list button,
.stage8g18a-demo-role-list button,
.stage8g17b-primary-actions button,
.stage8g15-queue-grid button,
.stage8g15-hub-grid button,
.stage8g15-wizard-grid button,
.stage8g15-cms-steps button,
.stage6-rfq-doc-card .small-button,
.stage6-bulk-review .small-button,
.stage6-mail-card .small-button,
.case360-list-item,
.case-checklist label {
  color: var(--ceig-text-dark);
  background: #ffffff;
  border-color: #cbd5e1;
}

.stage8g18a-file-list button:hover,
.stage8g18a-demo-role-list button:hover,
.stage8g17b-primary-actions button:hover,
.stage8g15-queue-grid button:hover,
.stage8g15-hub-grid button:hover,
.stage8g15-wizard-grid button:hover,
.stage8g15-cms-steps button:hover,
.stage6-rfq-doc-card .small-button:hover,
.stage6-bulk-review .small-button:hover,
.stage6-mail-card .small-button:hover,
.case360-list-item:hover {
  color: var(--ceig-text-dark);
  background: #fff7e6;
  border-color: var(--ceig-accent);
}

.status-pill,
.sla-pill,
.stage6-rfq-review-stats small,
.login-label,
.form-head span,
.badge,
.pill,
.tag,
.backend-status-strip strong,
.presence-strip strong {
  color: #111827;
  background: #f6d68a;
  border-color: #a06b12;
}

.status-pill.ok,
.sla-pill.ok,
.status-pill.success,
.pill.success,
.badge.success {
  color: #052e16;
  background: #bbf7d0;
  border-color: var(--ceig-success);
}

.status-pill.warning,
.sla-pill.warning,
.pill.warning,
.badge.warning {
  color: #3b2200;
  background: #fde68a;
  border-color: var(--ceig-warning);
}

.status-pill.danger,
.sla-pill.critical,
.pill.danger,
.badge.danger,
.small-button.danger {
  color: #fff7ed;
  background: #9f2319;
  border-color: var(--ceig-danger);
}

.stage6-rfq-review-stats span,
.case360-list-item.active,
.case-checklist label.checked {
  border-color: var(--ceig-accent);
  background: #fff7e6;
  color: var(--ceig-text-dark);
}

.stage6-rfq-review-stats strong,
.case360-metrics strong {
  color: #7c4a03;
}

.stage6-rfq-review-stats small,
.case360-list-item.active small,
.case-checklist label.checked span {
  color: var(--ceig-text-mid);
}

.portal-tabs,
.role-picker,
.sector-tabs,
.offer-targets {
  border-color: rgba(240, 193, 104, 0.24);
}

.portal-topbar {
  align-items: start;
}

.portal-tabs button {
  min-height: 46px;
  font-size: clamp(10px, 0.68vw, 12px);
  line-height: 1.18;
}

.backend-status-strip,
.sandbox-login-note,
.presence-strip {
  border-color: rgba(240, 193, 104, 0.38);
  background: rgba(240, 193, 104, 0.1);
}

.sandbox-login-note,
.sandbox-login-note span,
.sandbox-credentials span,
.sandbox-credentials small {
  color: var(--ceig-muted-light);
}

.stage8g18a-demo-topbar {
  background: #101615;
  border-color: rgba(240, 193, 104, 0.42);
}

.stage8g18a-demo-topbar strong {
  color: var(--ceig-accent-strong);
}

.stage8g18a-demo-topbar span,
.stage8g18a-demo-topbar small {
  color: var(--ceig-muted-light);
}

.stage8g18a-demo-tabs button {
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(240, 193, 104, 0.5);
}

.stage8g18a-demo-tabs button.active {
  color: #090b0f;
}

.stage8g18a-demo-shell,
.stage8g17b-external-shell {
  background: #f4f1e8;
  color: var(--ceig-text-dark);
}

.stage8g17b-external-topbar {
  background: #101615;
  color: var(--ceig-text-light);
  border-color: rgba(240, 193, 104, 0.42);
}

.stage8g17b-external-topbar :where(span, small, p) {
  color: var(--ceig-muted-light);
}

.stage8g17b-external-topbar strong {
  color: var(--ceig-accent-strong);
}

.micro-b2b-benefits,
.micro-b2b-form,
.factory-partner-application,
.inquiry-panel .system-form {
  color: var(--ceig-text-dark);
}

.micro-b2b-benefits :where(p, li, small),
.micro-b2b-form :where(p, small),
.factory-partner-application :where(p, small),
.inquiry-panel .system-form :where(p, small) {
  color: var(--ceig-text-mid);
}

.section-heading p,
.lead,
.factory-partner-intro > p,
.sector-panel p,
.capability-item p,
.market-card p,
.market-route-card p,
.contact-section p {
  color: var(--ceig-muted-light);
}

.sector-panel p,
.capability-item p,
.market-card p,
.market-route-card p {
  color: var(--ceig-text-mid);
}

.document-actions,
.stage6-send-buttons,
.stage6-bulk-actions,
.hero-actions,
.contact-actions {
  gap: 10px;
}

.stage6-bulk-header,
.stage6-rfq-review-head,
.stage6-send-options,
.stage6-bulk-actions {
  min-width: 0;
}

.stage6-bulk-actions .small-button,
.stage6-send-buttons .small-button,
.stage6-send-options > .small-button {
  min-width: min(100%, 150px);
}

.stage6-approval-check {
  border-color: #cbd5e1;
  background: #fffaf0;
  color: var(--ceig-text-dark);
}

.stage6-approval-check span,
.stage6-approval-check small {
  color: var(--ceig-text-mid);
}

.stage6-approval-check input,
.case-checklist input,
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--ceig-accent);
}

.stage6-rfq-review-grid,
.case360-shell,
.portal-grid,
.control-grid {
  min-width: 0;
}

.portal-tabs button,
.sector-tabs button,
.role-picker button,
.offer-targets button,
.small-button:not(.primary):not(.danger),
.text-button {
  color: #fffaf0;
  background: #17211f;
  border-color: rgba(240, 193, 104, 0.68);
}

.portal-tabs button:hover,
.sector-tabs button:hover,
.role-picker button:hover,
.offer-targets button:hover,
.small-button:not(.primary):not(.danger):hover,
.text-button:hover {
  color: #ffffff;
  background: #26322d;
  border-color: #f6d68a;
}

.portal-tabs button.active,
.sector-tabs button.active,
.role-picker button.active,
.offer-targets button.active,
.small-button.primary,
.button-primary,
.button:not(.button-ghost) {
  color: #090b0f;
  background: #f0c168;
  border-color: #8a5d13;
}

.stage6-rfq-review h3,
.stage6-rfq-review h4,
.stage6-rfq-review strong,
.stage6-rfq-pdf-preview h3,
.stage6-rfq-pdf-preview h4,
.stage6-rfq-files-preview h3,
.stage6-rfq-files-preview h4 {
  color: #0f172a;
}

.stage6-rfq-review p,
.stage6-rfq-pdf-preview p,
.stage6-rfq-files-preview p,
.case360-hero p,
.stage8g18a-demo-hub p,
.stage8g18a-demo-case p,
.stage8g18a-demo-files p,
.stage8g18a-demo-message p {
  color: var(--ceig-text-mid);
}

.stage8g15-simple-shell .stage8g20-simple-section > .board-column,
.stage8g15-simple-shell .stage8g20-simple-section .request-card,
.stage8g15-simple-shell .stage8g20-simple-section .security-info,
.stage8g15-simple-shell .stage8g18a-demo-hub,
.stage8g15-simple-shell .stage8g18a-demo-case,
.stage8g15-simple-shell .stage8g18a-demo-files,
.stage8g15-simple-shell .stage8g18a-demo-message,
.stage8g15-simple-shell .stage8g18a-demo-hub .board-column,
.stage8g15-simple-shell .stage8g18a-demo-case .board-column,
.stage8g15-simple-shell .stage8g18a-demo-files .board-column,
.stage8g15-simple-shell .stage8g18a-demo-message .board-column,
.stage8g15-simple-shell .stage8g18a-demo-hub .request-card,
.stage8g15-simple-shell .stage8g18a-demo-case .request-card,
.stage8g15-simple-shell .stage8g18a-demo-files .request-card,
.stage8g15-simple-shell .stage8g18a-demo-message .request-card {
  background: #ffffff;
  border-color: rgba(16, 24, 40, 0.12);
  color: #101828;
}

.stage8g15-simple-shell .stage8g20-simple-section > .board-column :where(h1, h2, h3, h4, strong),
.stage8g15-simple-shell .stage8g20-simple-section .request-card :where(h1, h2, h3, h4, strong),
.stage8g15-simple-shell .stage8g20-simple-section .security-info :where(h1, h2, h3, h4, strong),
.stage8g15-simple-shell .stage8g18a-demo-hub :where(h1, h2, h3, h4, strong),
.stage8g15-simple-shell .stage8g18a-demo-case :where(h1, h2, h3, h4, strong),
.stage8g15-simple-shell .stage8g18a-demo-files :where(h1, h2, h3, h4, strong),
.stage8g15-simple-shell .stage8g18a-demo-message :where(h1, h2, h3, h4, strong) {
  color: #101828;
}

.stage8g15-simple-shell .stage8g20-simple-section > .board-column :where(p, small, span, li),
.stage8g15-simple-shell .stage8g20-simple-section .request-card :where(p, small, span, li),
.stage8g15-simple-shell .stage8g20-simple-section .security-info :where(p, small, span, li),
.stage8g15-simple-shell .stage8g18a-demo-hub :where(p, small, span, li),
.stage8g15-simple-shell .stage8g18a-demo-case :where(p, small, span, li),
.stage8g15-simple-shell .stage8g18a-demo-files :where(p, small, span, li),
.stage8g15-simple-shell .stage8g18a-demo-message :where(p, small, span, li) {
  color: #344054;
}

.tour-overlay:not(.visible),
.modal-overlay:not(.visible),
[hidden] {
  pointer-events: none;
}

@media (max-width: 980px) {
  .portal-topbar,
  .stage8g20-advanced-warning,
  .stage6-rfq-review-head,
  .stage6-rfq-review-grid,
  .case360-shell,
  .case360-hero,
  .case360-grid,
  .case360-metrics,
  .stage6-rfq-review-stats {
    grid-template-columns: 1fr;
  }

  .portal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage8g15-advanced-button {
    width: 100%;
    min-width: 0;
  }

  .stage8g20-advanced-warning {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .portal-tabs,
  .role-picker,
  .sector-tabs,
  .demo-access-list,
  .stage8g18a-demo-tabs {
    grid-template-columns: 1fr;
  }

  .button,
  .small-button,
  button {
    min-height: 44px;
  }

  .stage6-rfq-review,
  .stage6-rfq-pdf-preview,
  .stage6-rfq-files-preview,
  .case360-hero,
  .case360-sla,
  .stage8g18a-demo-login,
  .stage8g18a-demo-hub,
  .stage8g18a-demo-case,
  .stage8g18a-demo-files,
  .stage8g18a-demo-message {
    padding: 14px;
  }
}

/* Stage 8G21B: unified dark public page polish for staging approval. */
:root {
  --ceig-public-surface:
    linear-gradient(180deg, rgba(15, 24, 24, 0.97), rgba(5, 7, 7, 0.99)),
    radial-gradient(circle at 96% 0%, rgba(216, 155, 47, 0.12), transparent 34%);
  --ceig-public-card: rgba(255, 255, 255, 0.045);
  --ceig-public-card-strong: rgba(255, 255, 255, 0.065);
  --ceig-public-border: rgba(216, 155, 47, 0.3);
  --ceig-public-border-soft: rgba(216, 155, 47, 0.2);
  --ceig-public-text: #fffaf0;
  --ceig-public-muted: #e7ddd0;
  --ceig-public-soft: #d8cec2;
  --ceig-public-quiet: #c8bfb4;
  --ceig-public-gold: #f0c168;
  --ceig-public-gold-strong: #f6d68a;
  --ceig-public-field: #0e1716;
}

.signal-strip article,
.sectors-section .sector-panel,
.sectors-section .inquiry-panel .system-form,
.operating-section .system-card,
.micro-b2b-section .micro-b2b-benefits,
.micro-b2b-section .micro-b2b-form,
.micro-b2b-section .micro-b2b-info-card,
.split-section .capability-item,
.markets-section .market-map,
.markets-section .market-map-caption article,
.markets-section .market-cluster-card,
.markets-section .market-card,
.markets-section .market-route-card,
.factory-partner-section .factory-partner-intro,
.factory-partner-section .factory-partner-application {
  border-color: var(--ceig-public-border);
  background: var(--ceig-public-surface);
  color: var(--ceig-public-text);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.38);
}

.sectors-section .sector-card,
.sectors-section .sector-operating-layer,
.sectors-section .sector-process-step,
.sectors-section .sector-proof-intro,
.sectors-section .sector-proof-item,
.sectors-section .inquiry-wizard article,
.micro-b2b-section .micro-b2b-fit-card,
.micro-b2b-section .micro-b2b-info-card,
.factory-partner-section .factory-partner-points article,
.markets-section .market-route-steps span {
  border-color: var(--ceig-public-border-soft);
  background: linear-gradient(180deg, rgba(13, 22, 21, 0.88), rgba(7, 10, 10, 0.94));
  color: var(--ceig-public-text);
}

.sectors-section :where(h2, h3, h4, strong),
.sectors-section .inquiry-panel .system-form :where(h3, h4, strong, label > span),
.sectors-section .inquiry-panel .form-head h3,
.operating-section .system-card :where(h3, h4, strong),
.micro-b2b-section :where(h2, h3, h4, strong, b, label > span),
.micro-b2b-section .micro-b2b-form .form-head h3,
.split-section .capability-item :where(h3, h4, strong),
.markets-section :where(h2, h3, h4, strong),
.factory-partner-section :where(h2, h3, h4, strong, label > span) {
  color: var(--ceig-public-gold);
}

.signal-strip span,
.sectors-section :where(p, li, small),
.sectors-section .sector-panel span:not(.status-pill),
.sectors-section .inquiry-panel .system-form :where(p, small),
.operating-section .system-card :where(p, li, small, span),
.micro-b2b-section :where(p, li, small),
.micro-b2b-section :where(.micro-b2b-benefits, .micro-b2b-form, .micro-b2b-info-card) span:not(.status-pill),
.split-section .capability-item :where(p, li, small, span),
.markets-section :where(p, li, small),
.markets-section :where(.market-card, .market-route-card, .market-map-caption, .market-cluster-card) span:not(.status-pill),
.factory-partner-section :where(p, li, small),
.factory-partner-section span:not(.status-pill) {
  color: var(--ceig-public-muted);
}

.operating-section .system-card p,
.micro-b2b-section .micro-b2b-benefits p,
.micro-b2b-section .micro-b2b-form p,
.micro-b2b-section .micro-b2b-info-card p,
.split-section .capability-item p,
.markets-section .market-card p,
.markets-section .market-route-card p,
.markets-section .market-map-caption p,
.markets-section .market-cluster-card p,
.factory-partner-section .factory-partner-intro p,
.factory-partner-section .factory-partner-application p,
.factory-partner-section .factory-partner-points article p {
  color: var(--ceig-public-muted);
}

.sectors-section .sector-operating-copy p,
.sectors-section .sector-process-step p,
.sectors-section .sector-proof-intro p,
.sectors-section .sector-proof-item p,
.sectors-section .sector-checklist li,
.sectors-section .sector-proof-list li,
.sectors-section .inquiry-wizard p,
.sectors-section .inquiry-wizard span,
.micro-b2b-section .micro-b2b-fit-grid small,
.markets-section .market-route-steps span {
  color: var(--ceig-public-soft);
}

.sector-tabs button {
  border-color: var(--ceig-public-border-soft);
  background: rgba(15, 24, 24, 0.94);
  color: var(--ceig-public-muted);
  box-shadow: none;
}

.sector-tabs button:hover {
  border-color: rgba(240, 193, 104, 0.5);
  background: rgba(240, 193, 104, 0.1);
  color: var(--ceig-public-text);
}

.sector-tabs button.active {
  border-color: rgba(246, 214, 138, 0.78);
  background:
    linear-gradient(180deg, rgba(35, 29, 16, 0.88), rgba(12, 17, 16, 0.96)),
    radial-gradient(circle at 95% 0%, rgba(240, 193, 104, 0.18), transparent 42%);
  color: var(--ceig-public-gold-strong);
  box-shadow: inset 0 0 0 1px rgba(240, 193, 104, 0.22);
}

.sectors-section .form-head span,
.micro-b2b-section .micro-b2b-tags span,
.micro-b2b-section .form-head span,
.micro-b2b-section .status-pill,
.markets-section .market-tags em,
.markets-section .status-pill,
.factory-partner-section .status-pill {
  border-color: rgba(240, 193, 104, 0.58);
  background: rgba(12, 18, 18, 0.88);
  color: var(--ceig-public-gold-strong);
}

.sectors-section input,
.sectors-section textarea,
.sectors-section select,
.micro-b2b-section input,
.micro-b2b-section textarea,
.micro-b2b-section select,
.factory-partner-section input,
.factory-partner-section textarea,
.factory-partner-section select {
  border-color: rgba(240, 193, 104, 0.34);
  background: var(--ceig-public-field);
  color: var(--ceig-public-text);
}

.sectors-section input:focus,
.sectors-section textarea:focus,
.sectors-section select:focus,
.micro-b2b-section input:focus,
.micro-b2b-section textarea:focus,
.micro-b2b-section select:focus,
.factory-partner-section input:focus,
.factory-partner-section textarea:focus,
.factory-partner-section select:focus {
  border-color: rgba(246, 214, 138, 0.72);
  box-shadow: 0 0 0 3px rgba(240, 193, 104, 0.14);
  outline: none;
}

.sectors-section input::placeholder,
.sectors-section textarea::placeholder,
.micro-b2b-section input::placeholder,
.micro-b2b-section textarea::placeholder,
.factory-partner-section input::placeholder,
.factory-partner-section textarea::placeholder {
  color: var(--ceig-public-quiet);
  opacity: 1;
}

.sectors-section input::file-selector-button,
.micro-b2b-section input::file-selector-button,
.factory-partner-section input::file-selector-button {
  border: 0;
  border-right: 1px solid rgba(240, 193, 104, 0.28);
  background: linear-gradient(180deg, rgba(35, 29, 16, 0.88), rgba(12, 18, 18, 0.94));
  color: var(--ceig-public-text);
  font: inherit;
  font-weight: 700;
  margin: -12px 12px -12px -14px;
  padding: 12px 14px;
}

/* Stage 8G21C: unified dark CEIG portal polish. Public pages are intentionally untouched. */
#portal {
  --ceig-panel-surface:
    linear-gradient(180deg, rgba(14, 21, 21, 0.98), rgba(5, 7, 7, 0.99)),
    radial-gradient(circle at 98% 0%, rgba(240, 193, 104, 0.12), transparent 34%);
  --ceig-panel-card: linear-gradient(180deg, rgba(13, 21, 20, 0.96), rgba(7, 10, 10, 0.98));
  --ceig-panel-card-soft: rgba(255, 255, 255, 0.055);
  --ceig-panel-border: rgba(216, 155, 47, 0.32);
  --ceig-panel-border-soft: rgba(216, 155, 47, 0.2);
  --ceig-panel-text: #fffaf0;
  --ceig-panel-muted: #e7ddd0;
  --ceig-panel-soft: #cfc5b8;
  --ceig-panel-quiet: #bdb4aa;
  --ceig-panel-gold: #f0c168;
  --ceig-panel-gold-strong: #f6d68a;
  --ceig-panel-field: #0e1716;
}

#portal .portal-grid,
#portal .portal-login,
#portal .portal-board,
#portal .portal-shell,
#portal .stage8g15-simple-shell,
#portal .stage8g15-shell,
#portal .production-rc-home,
#portal .stage8g13-rfq-wizard,
#portal .production-rc-replies,
#portal .stage6-mail-center,
#portal .public-cms-editor,
#portal .case360-shell {
  background: var(--ceig-panel-surface) !important;
  color: var(--ceig-panel-text) !important;
}

#portal .login-card,
#portal .portal-topbar,
#portal .stage8g15-simple-topbar,
#portal .undo-bar,
#portal .backend-status-strip,
#portal .sandbox-safety-strip,
#portal .presence-strip,
#portal .presence-card,
#portal .production-rc-head,
#portal .production-rc-tile,
#portal .production-rc-checks article,
#portal .production-rc-reply-grid article,
#portal .stage8g14-primary-action,
#portal .stage8g15-focus-card,
#portal .stage8g15-action-queue,
#portal .stage8g15-hub,
#portal .stage8g15-hub-grid article,
#portal .stage8g15-wizard,
#portal .stage8g15-cms-wizard,
#portal .stage8g15-role-tasks,
#portal .stage8g15-queue-column,
#portal .stage8g15-case-card,
#portal .stage8g15-wizard-grid article,
#portal .stage8g15-cms-steps article,
#portal .stage8g15-cms-current,
#portal .stage8g13-wizard-steps article,
#portal .stage8g13-project-grid article,
#portal .stage8g13-language-card,
#portal .stage8g13-language-card .warning,
#portal .stage8g13-preview-columns article,
#portal .stage8g13-preview-columns pre,
#portal .stage8g20-simple-section > .board-column,
#portal .stage8g20-simple-section .request-card,
#portal .stage8g20-simple-section .security-info,
#portal .stage8g20-advanced-warning,
#portal .stage8g18a-demo-hub,
#portal .stage8g18a-demo-case,
#portal .stage8g18a-demo-files,
#portal .stage8g18a-demo-message,
#portal .stage8g18a-demo-hub .board-column,
#portal .stage8g18a-demo-case .board-column,
#portal .stage8g18a-demo-files .board-column,
#portal .stage8g18a-demo-message .board-column,
#portal .stage8g18a-demo-hub .request-card,
#portal .stage8g18a-demo-case .request-card,
#portal .stage8g18a-demo-files .request-card,
#portal .stage8g18a-demo-message .request-card,
#portal .stage6-rfq-review,
#portal .stage6-rfq-review article,
#portal .stage6-rfq-review pre,
#portal .stage6-rfq-review .file-chip,
#portal .stage6-rfq-review-stats span,
#portal .stage6-rfq-pdf-preview,
#portal .stage6-rfq-pdf-preview article,
#portal .stage6-rfq-pdf-preview pre,
#portal .stage6-rfq-pdf-preview .file-chip,
#portal .stage6-rfq-files-preview,
#portal .stage6-rfq-files-preview article,
#portal .stage6-rfq-files-preview pre,
#portal .stage6-rfq-files-preview .file-chip,
#portal .stage6-rfq-doc-card,
#portal .stage6-bulk-panel,
#portal .stage6-bulk-review,
#portal .stage6-bulk-review article,
#portal .stage6-mail-card,
#portal .stage6-safe-preview,
#portal .stage6-detail,
#portal .stage6-hero,
#portal .stage6-metrics article,
#portal .stage6-bulk-review,
#portal .stage6-approval-check,
#portal .case360-hero,
#portal .case360-sla,
#portal .case360-metrics article,
#portal .case360-list-item,
#portal .case360-shell label,
#portal .stage8g16-case360-truth,
#portal .stage8g16-truth-grid article,
#portal .stage8g16-router-preview p,
#portal .stage8g16-module-scope,
#portal .stage8g16-permission-grid article,
#portal .board-column,
#portal .dashboard-card,
#portal .request-card,
#portal .pipeline-column,
#portal .pipeline-card,
#portal .order-item,
#portal .material-card,
#portal .partner-access-card,
#portal .offer-builder,
#portal .audit-card,
#portal .system-card,
#portal .factory-settings,
#portal .system-form,
#portal .crm-card,
#portal .market-card,
#portal .capability-item,
#portal .access-item,
#portal .task-item,
#portal .audit-item,
#portal .report-card,
#portal .document-item,
#portal .activity-item,
#portal .comment-item,
#portal .mail-card,
#portal .mail-row,
#portal .mail-thread,
#portal .mail-detail,
#portal .mail-composer,
#portal .mail-center,
#portal .mail-tracking-panel {
  background: var(--ceig-panel-card) !important;
  border-color: var(--ceig-panel-border) !important;
  color: var(--ceig-panel-text) !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.4) !important;
}

#portal .portal-tabs,
#portal .role-picker,
#portal .offer-targets {
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(240, 193, 104, 0.18) !important;
}

#portal .portal-tabs button,
#portal .role-picker button,
#portal .offer-targets button,
#portal .stage8g15-simple-topbar .portal-tabs button,
#portal .stage8g15-hub-grid button,
#portal .stage8g15-role-tasks button,
#portal .production-rc-reply-list button,
#portal .small-button:not(.primary):not(.danger),
#portal .text-button {
  background: rgba(15, 24, 24, 0.95) !important;
  border-color: var(--ceig-panel-border-soft) !important;
  color: var(--ceig-panel-muted) !important;
  box-shadow: none !important;
}

#portal .portal-tabs button:hover,
#portal .role-picker button:hover,
#portal .offer-targets button:hover,
#portal .stage8g15-simple-topbar .portal-tabs button:hover,
#portal .stage8g15-hub-grid button:hover,
#portal .stage8g15-role-tasks button:hover,
#portal .production-rc-reply-list button:hover,
#portal .small-button:not(.primary):not(.danger):hover,
#portal .text-button:hover {
  background: rgba(240, 193, 104, 0.1) !important;
  border-color: rgba(246, 214, 138, 0.62) !important;
  color: var(--ceig-panel-text) !important;
}

#portal .portal-tabs button.active,
#portal .role-picker button.active,
#portal .offer-targets button.active,
#portal .stage8g15-simple-topbar .portal-tabs button.active {
  background:
    linear-gradient(180deg, rgba(46, 35, 15, 0.95), rgba(13, 17, 16, 0.98)),
    radial-gradient(circle at 92% 0%, rgba(240, 193, 104, 0.22), transparent 44%) !important;
  border-color: rgba(246, 214, 138, 0.78) !important;
  color: var(--ceig-panel-gold-strong) !important;
  box-shadow: inset 0 0 0 1px rgba(240, 193, 104, 0.24) !important;
}

#portal .stage8g15-advanced-button {
  background:
    linear-gradient(180deg, rgba(42, 31, 15, 0.96), rgba(11, 15, 14, 0.98)),
    radial-gradient(circle at 92% 0%, rgba(240, 193, 104, 0.18), transparent 44%) !important;
  border-color: rgba(246, 214, 138, 0.58) !important;
  color: var(--ceig-panel-text) !important;
}

#portal .stage8g15-advanced-button span,
#portal .stage8g15-advanced-button strong {
  color: var(--ceig-panel-gold-strong) !important;
}

#portal :where(h1, h2, h3, h4),
#portal .section-heading :where(h2, h3),
#portal .stage8g15-focus-card h3,
#portal .stage8g15-section-head h3,
#portal .stage8g15-role-tasks h3,
#portal .stage8g13-language-card h3,
#portal .stage8g13-language-card h4,
#portal .stage8g15-queue-column h4,
#portal .stage8g15-case-card h4,
#portal .stage8g15-hub h4,
#portal .stage8g15-cms-steps h4,
#portal .stage8g13-wizard-steps h4,
#portal .stage8g13-project-grid h4,
#portal .stage8g13-preview-columns :where(h3, h4),
#portal .stage6-rfq-review :where(h3, h4),
#portal .stage6-rfq-pdf-preview :where(h3, h4),
#portal .stage6-rfq-files-preview :where(h3, h4),
#portal .stage6-bulk-review :where(h3, h4),
#portal .stage6-mail-card :where(h3, h4),
#portal .case360-shell :where(h3, h4),
#portal .stage8g16-case360-truth :where(h3, h4),
#portal .stage8g16-module-scope :where(h3, h4),
#portal .production-rc-head :where(h2, h3),
#portal .board-column h3,
#portal .login-card h3 {
  color: var(--ceig-panel-text) !important;
}

#portal :where(strong, b),
#portal .login-label,
#portal .dashboard-card strong,
#portal .production-rc-tile strong,
#portal .production-rc-checks strong,
#portal .stage8g15-section-head strong,
#portal .stage8g15-wizard-grid strong,
#portal .stage8g15-cms-steps strong,
#portal .stage8g15-queue-column header strong,
#portal .stage8g13-wizard-steps strong,
#portal .stage8g13-project-grid strong,
#portal .stage8g13-preview-columns strong,
#portal .stage6-rfq-review strong,
#portal .stage6-rfq-pdf-preview strong,
#portal .stage6-rfq-files-preview strong,
#portal .stage6-bulk-review strong,
#portal .stage6-mail-card strong,
#portal .stage8g16-case360-truth strong,
#portal .stage8g16-module-scope strong,
#portal .case360-shell strong {
  color: var(--ceig-panel-gold) !important;
}

#portal :where(p, li, small),
#portal .login-card p,
#portal .dashboard-card p,
#portal .board-column p,
#portal .system-card p,
#portal .production-rc-head p,
#portal .production-rc-tile p,
#portal .production-rc-checks p,
#portal .stage8g15-focus-card p,
#portal .stage8g15-section-head p,
#portal .stage8g15-role-tasks p,
#portal .stage8g15-case-card p,
#portal .stage8g15-case-card small,
#portal .stage8g15-hub-grid span,
#portal .stage8g15-cms-current span,
#portal .stage8g15-cms-current small,
#portal .stage8g13-language-card :where(p, small, span, li),
#portal .stage8g13-wizard-steps :where(p, small, span, li),
#portal .stage8g13-project-grid :where(p, small, span, li),
#portal .stage8g13-preview-columns :where(p, small, span, li),
#portal .stage8g20-simple-section > .board-column p,
#portal .stage8g20-simple-section .request-card p,
#portal .stage8g20-simple-section .security-info p,
#portal .stage8g18a-demo-hub :where(p, small, span, li),
#portal .stage8g18a-demo-case :where(p, small, span, li),
#portal .stage8g18a-demo-files :where(p, small, span, li),
#portal .stage8g18a-demo-message :where(p, small, span, li),
#portal .stage6-mail-center p,
#portal .stage6-detail p,
#portal .stage6-rfq-review p,
#portal .stage6-rfq-review :where(small, span, li),
#portal .stage6-rfq-pdf-preview p,
#portal .stage6-rfq-pdf-preview :where(small, span, li),
#portal .stage6-rfq-files-preview p,
#portal .stage6-rfq-files-preview :where(small, span, li),
#portal .stage6-bulk-review :where(p, small, span, li),
#portal .stage6-mail-card :where(p, small, span, li),
#portal .stage6-safe-preview :where(p, small, span, li),
#portal .case360-shell :where(p, small, span, li),
#portal .stage8g16-case360-truth :where(p, small, span, li),
#portal .stage8g16-module-scope :where(p, small, span, li),
#portal .case360-list-item :where(span, small) {
  color: var(--ceig-panel-muted) !important;
}

#portal :where(input, textarea, select) {
  background: var(--ceig-panel-field) !important;
  border-color: rgba(240, 193, 104, 0.34) !important;
  color: var(--ceig-panel-text) !important;
}

#portal :where(input, textarea, select):focus {
  border-color: rgba(246, 214, 138, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(240, 193, 104, 0.14) !important;
  outline: none !important;
}

#portal :where(input, textarea)::placeholder {
  color: var(--ceig-panel-quiet) !important;
  opacity: 1;
}

#portal input::file-selector-button {
  border: 0;
  border-right: 1px solid rgba(240, 193, 104, 0.28);
  background: linear-gradient(180deg, rgba(35, 29, 16, 0.92), rgba(12, 18, 18, 0.96));
  color: var(--ceig-panel-text);
  font: inherit;
  font-weight: 700;
}

#portal .button-primary,
#portal .button:not(.button-ghost),
#portal .small-button.primary {
  background: linear-gradient(180deg, #f6d68a, #f0c168) !important;
  background-color: #f0c168 !important;
  border-color: rgba(138, 93, 19, 0.9) !important;
  color: #090b0f !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28) !important;
}

#portal :where(button, a).small-button:not(.primary):not(.danger),
#portal :where(button, a).button.button-ghost {
  background: rgba(15, 24, 24, 0.96) !important;
  border-color: rgba(240, 193, 104, 0.46) !important;
  color: var(--ceig-panel-text) !important;
  box-shadow: none !important;
}

#portal :where(button, a).small-button:not(.primary):not(.danger):hover,
#portal :where(button, a).button.button-ghost:hover {
  background: rgba(32, 38, 33, 0.98) !important;
  border-color: rgba(246, 214, 138, 0.78) !important;
  color: var(--ceig-panel-gold-strong) !important;
}

#portal .status-pill,
#portal .sla-pill,
#portal .login-label,
#portal .production-rc-tile span,
#portal .stage8g15-case-card .status-pill,
#portal .stage8g15-hub-grid p,
#portal .presence-card span,
#portal .presence-list span,
#portal .presence-list strong,
#portal .presence-strip span,
#portal .presence-strip strong,
#portal .presence-strip small {
  background: rgba(12, 18, 18, 0.88) !important;
  border-color: rgba(240, 193, 104, 0.55) !important;
  color: var(--ceig-panel-gold-strong) !important;
}

#portal hr,
#portal .divider {
  border-color: rgba(240, 193, 104, 0.18) !important;
}

/* Stage 8G21D: finish portal-only dark responsive polish across all logged-in panels. */
#portal,
#portal * {
  box-sizing: border-box;
}

#portal .portal-grid,
#portal .portal-board,
#portal .portal-login,
#portal .login-card,
#portal .portal-topbar,
#portal .stage8g15-simple-topbar,
#portal .portal-tabs,
#portal .stage8g15-simple-shell,
#portal .stage8g20-simple-section,
#portal .stage8g15-simple-section,
#portal .stage6-grid,
#portal .stage7-grid,
#portal .mail-center-grid,
#portal .public-cms-grid,
#portal .public-cms-form,
#portal .stage8g18a-demo-grid,
#portal .stage8g18a-demo-hub-grid,
#portal .case360-shell,
#portal .case360-main,
#portal .stage6-detail-grid,
#portal .stage7-detail-grid,
#portal .form-grid,
#portal .system-form,
#portal .system-card,
#portal .board-column,
#portal .request-card,
#portal .dashboard-card {
  min-width: 0 !important;
  max-width: 100% !important;
}

#portal :where(input, textarea, select) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#portal select,
#portal option {
  overflow: hidden;
  text-overflow: ellipsis;
}

#portal .wide-field,
#portal label,
#portal .public-cms-wide,
#portal .stage7-simple-mail-panel,
#portal .stage7-simple-compose-form,
#portal .stage7-inbox-center,
#portal .mail-center,
#portal .stage6-mail-center {
  min-width: 0 !important;
  max-width: 100% !important;
}

#portal .stage8g18a-demo-login,
#portal .stage8g18a-demo-shell,
#portal .stage8g18a-demo-topbar,
#portal .stage8g18a-demo-hub,
#portal .stage8g18a-demo-case,
#portal .stage8g18a-demo-files,
#portal .stage8g18a-demo-message,
#portal .stage8g18a-demo-role-list button,
#portal .stage8g18a-file-list button,
#portal .stage8g18a-demo-tabs button,
#portal .stage8g18a-demo-login article,
#portal .stage8g18a-demo-grid article,
#portal .stage8g18a-demo-hub-grid article,
#portal .stage8g18a-demo-timeline article,
#portal .stage8g18a-demo-message-card,
#portal .stage8g18a-demo-link-box,
#portal .stage8g18a-demo-preview,
#portal .stage8g17b-first-screen,
#portal .demo-access-card,
#portal .demo-access-list button,
#portal .role-demo-card {
  background:
    linear-gradient(180deg, rgba(14, 18, 17, 0.98), rgba(7, 9, 8, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(240, 193, 104, 0.12), transparent 40%) !important;
  border-color: var(--ceig-panel-border) !important;
  color: var(--ceig-panel-text) !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38) !important;
}

#portal .stage8g18a-demo-role-list button.active,
#portal .stage8g18a-file-list button.active,
#portal .stage8g18a-demo-tabs button.active,
#portal .demo-access-list button.active {
  background:
    linear-gradient(180deg, rgba(48, 36, 16, 0.97), rgba(12, 15, 14, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(246, 214, 138, 0.2), transparent 42%) !important;
  border-color: rgba(246, 214, 138, 0.78) !important;
  color: var(--ceig-panel-gold-strong) !important;
}

#portal .stage8g18a-demo-login :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-shell :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-topbar :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-hub :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-case :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-files :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-message :where(h1, h2, h3, h4, strong, b),
#portal .stage8g18a-demo-role-list button :where(strong, b),
#portal .stage8g18a-file-list button :where(strong, b) {
  color: var(--ceig-panel-gold-strong) !important;
}

#portal .stage8g18a-demo-login :where(p, small, span, li),
#portal .stage8g18a-demo-shell :where(p, small, span, li),
#portal .stage8g18a-demo-topbar :where(p, small, span, li),
#portal .stage8g18a-demo-hub :where(p, small, span, li),
#portal .stage8g18a-demo-case :where(p, small, span, li),
#portal .stage8g18a-demo-files :where(p, small, span, li),
#portal .stage8g18a-demo-message :where(p, small, span, li),
#portal .stage8g18a-demo-role-list button :where(p, small, span, li),
#portal .stage8g18a-file-list button :where(p, small, span, li) {
  color: var(--ceig-panel-muted) !important;
}

#portal .public-cms-form :where(input, textarea, select),
#portal .stage7-simple-compose-form :where(input, textarea, select),
#portal .stage7-assign-form :where(input, textarea, select),
#portal .stage6-send-form :where(input, textarea, select),
#portal .mail-composer :where(input, textarea, select) {
  display: block;
}

#portal .mail-row,
#portal .stage7-mail-row,
#portal .stage7-inbox-row,
#portal .stage7-reply-row,
#portal .stage6-mail-card,
#portal .stage6-bulk-review article {
  overflow: hidden;
}

#portal .mail-row *,
#portal .stage7-mail-row *,
#portal .stage7-inbox-row *,
#portal .stage7-reply-row *,
#portal .stage6-mail-card *,
#portal .stage6-bulk-review article * {
  min-width: 0;
}

#portal .mail-row :where(p, small, span),
#portal .stage7-mail-row :where(p, small, span),
#portal .stage7-inbox-row :where(p, small, span),
#portal .stage7-reply-row :where(p, small, span) {
  overflow-wrap: anywhere;
}

#portal .partner-panel,
#portal .designer-panel,
#portal .components-panel,
#portal .distributor-panel,
#portal .assembly-panel,
#portal .agent-panel,
#portal .client-panel,
#portal .factory-panel,
#portal .stage8g17b-panel,
#portal .stage8g17b-screen,
#portal .stage8g17b-card,
#portal .stage8g17b-first-screen,
#portal .stage8g17-layman-panel,
#portal .stage8g17-card,
#portal .stage8g16-role-panel,
#portal .role-panel,
#portal .external-panel,
#portal .layman-panel {
  background:
    linear-gradient(180deg, rgba(14, 18, 17, 0.98), rgba(8, 10, 9, 0.98)),
    radial-gradient(circle at 96% 0%, rgba(240, 193, 104, 0.1), transparent 42%) !important;
  border-color: var(--ceig-panel-border) !important;
  color: var(--ceig-panel-text) !important;
}

#portal .partner-panel :where(h1, h2, h3, h4, strong, b),
#portal .designer-panel :where(h1, h2, h3, h4, strong, b),
#portal .components-panel :where(h1, h2, h3, h4, strong, b),
#portal .distributor-panel :where(h1, h2, h3, h4, strong, b),
#portal .assembly-panel :where(h1, h2, h3, h4, strong, b),
#portal .agent-panel :where(h1, h2, h3, h4, strong, b),
#portal .client-panel :where(h1, h2, h3, h4, strong, b),
#portal .factory-panel :where(h1, h2, h3, h4, strong, b),
#portal .external-panel :where(h1, h2, h3, h4, strong, b),
#portal .layman-panel :where(h1, h2, h3, h4, strong, b) {
  color: var(--ceig-panel-gold-strong) !important;
}

#portal .partner-panel :where(p, small, span, li),
#portal .designer-panel :where(p, small, span, li),
#portal .components-panel :where(p, small, span, li),
#portal .distributor-panel :where(p, small, span, li),
#portal .assembly-panel :where(p, small, span, li),
#portal .agent-panel :where(p, small, span, li),
#portal .client-panel :where(p, small, span, li),
#portal .factory-panel :where(p, small, span, li),
#portal .external-panel :where(p, small, span, li),
#portal .layman-panel :where(p, small, span, li) {
  color: var(--ceig-panel-muted) !important;
}

#portal .external-layman-shell,
#portal .stage8g17b-external-shell,
#portal .stage8g17b-external-topbar,
#portal .stage8g17b-first-screen,
#portal .stage8g17b-scope-summary,
#portal .stage8g17b-scope-summary article,
#portal .stage8g17b-detail-grid,
#portal .stage8g17b-detail-grid article,
#portal .stage8g17b-details {
  background:
    linear-gradient(180deg, rgba(14, 18, 17, 0.98), rgba(7, 9, 8, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(240, 193, 104, 0.12), transparent 42%) !important;
  border-color: var(--ceig-panel-border) !important;
  color: var(--ceig-panel-text) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36) !important;
}

#portal .stage8g17b-external-topbar :where(strong, b),
#portal .stage8g17b-first-screen :where(h1, h2, h3, h4, strong, b),
#portal .stage8g17b-scope-summary :where(strong, b),
#portal .stage8g17b-detail-grid :where(strong, b),
#portal .stage8g17b-details summary {
  color: var(--ceig-panel-gold-strong) !important;
}

#portal .stage8g17b-external-topbar :where(p, small, span, li),
#portal .stage8g17b-first-screen :where(p, small, span, li),
#portal .stage8g17b-scope-summary :where(p, small, span, li),
#portal .stage8g17b-detail-grid :where(p, small, span, li),
#portal .stage8g17b-details :where(p, small, span, li) {
  color: var(--ceig-panel-muted) !important;
}

#portal .stage8g17-primary-actions,
#portal .stage8g17b-first-screen .stage8g17-primary-actions,
#portal .stage8g17b-scope-summary,
#portal .stage8g17b-detail-grid {
  min-width: 0 !important;
  max-width: 100% !important;
}

#portal .stage8g17-primary-actions button,
#portal .stage8g17b-first-screen .stage8g17-primary-actions button {
  background: rgba(15, 24, 24, 0.95) !important;
  border-color: var(--ceig-panel-border-soft) !important;
  color: var(--ceig-panel-text) !important;
}

#portal .stage8g17-primary-actions button.primary,
#portal .stage8g17b-first-screen .stage8g17-primary-actions button.primary {
  background: linear-gradient(180deg, #f6d68a, #f0c168) !important;
  background-color: #f0c168 !important;
  border-color: rgba(138, 93, 19, 0.9) !important;
  color: #090b0f !important;
}

#portal input {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 760px) {
  #portal {
    overflow-x: hidden;
  }

  #portal .portal-grid,
  #portal .stage8g15-simple-shell,
  #portal .stage8g20-simple-section,
  #portal .stage6-grid,
  #portal .stage7-grid,
  #portal .mail-center-grid,
  #portal .public-cms-grid,
  #portal .stage8g18a-demo-grid,
  #portal .stage8g18a-demo-hub-grid,
  #portal .case360-shell,
  #portal .stage6-detail-grid,
  #portal .stage7-detail-grid,
  #portal .form-grid,
  #portal .stage8g17-primary-actions,
  #portal .stage8g17b-first-screen .stage8g17-primary-actions,
  #portal .stage8g17b-scope-summary,
  #portal .stage8g17b-detail-grid {
    grid-template-columns: 1fr !important;
  }

  #portal .portal-tabs,
  #portal .stage8g15-simple-topbar .portal-tabs,
  #portal .stage8g18a-demo-tabs,
  #portal .role-picker,
  #portal .offer-targets {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #portal .portal-tabs button,
  #portal .stage8g15-simple-topbar .portal-tabs button,
  #portal .stage8g18a-demo-tabs button,
  #portal .role-picker button,
  #portal .offer-targets button {
    min-height: 48px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  #portal .portal-topbar,
  #portal .stage8g15-simple-topbar,
  #portal .stage8g18a-demo-topbar {
    align-items: stretch !important;
  }

  #portal .stage8g15-advanced-button,
  #portal .button,
  #portal .button-primary {
    width: 100%;
  }
}

/* Stage C2: scoped internal-role and individual demo-token UI */
#portal .internal-ceig-shell {
  --internal-accent: #f0c168;
  --internal-border: rgba(240, 193, 104, 0.3);
  min-width: 0;
  color: #f8f5ee;
}

#portal .internal-ceig-topbar {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--internal-border);
  background: #0a0c0c !important;
}

#portal .internal-ceig-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#portal .internal-ceig-identity strong {
  color: var(--internal-accent) !important;
  font-size: 1.3rem;
}

#portal .internal-ceig-identity span {
  color: #fffaf0 !important;
  font-weight: 750;
}

#portal .internal-ceig-identity small {
  color: #bbb6aa !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

#portal .internal-ceig-topbar .portal-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

#portal .internal-ceig-topbar .portal-tabs button {
  min-height: 44px;
  border-color: rgba(240, 193, 104, 0.2) !important;
  background: #111515 !important;
  color: #e7e2d7 !important;
}

#portal .internal-ceig-topbar .portal-tabs button.active {
  border-color: rgba(240, 193, 104, 0.75) !important;
  background: #f0c168 !important;
  color: #080909 !important;
}

#portal .internal-ceig-shell :where(.panel-workbench, .board-column, .request-card, .admin-guide, .metric-card) {
  min-width: 0;
  border-color: var(--internal-border) !important;
  background: #0d1010 !important;
  color: #f8f5ee !important;
}

#portal .internal-ceig-shell :where(h1, h2, h3, h4, strong, b) {
  color: #f5cd78 !important;
}

#portal .internal-ceig-shell :where(p, small, li, label, span) {
  color: #d3cec2;
  overflow-wrap: anywhere;
}

#portal .internal-department-documents .workbench-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#portal .stage-c2-demo-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.7fr);
  gap: 10px;
  margin: 14px 0 10px;
}

#portal .stage-c2-demo-create-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#portal .stage-c2-demo-create-form :where(input, select) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#portal .stage-c2-demo-create-button {
  width: 100%;
  min-height: 44px;
}

#portal .stage-c2-demo-created {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(240, 193, 104, 0.48);
  border-radius: 6px;
  background: #101411;
}

#portal .stage-c2-demo-created .stage8g18a-demo-link-box {
  max-height: 104px;
  overflow: auto;
  overflow-wrap: anywhere;
}

#portal .stage-c2-demo-token-register {
  margin-top: 16px;
}

#portal .stage-c2-demo-token-register-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

#portal .stage-c2-demo-token-register-head > div {
  min-width: 0;
}

#portal .stage-c2-demo-token-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin-top: 12px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#portal .stage-c2-demo-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(240, 193, 104, 0.2);
  border-radius: 6px;
  background: #0b0e0e;
}

#portal .stage-c2-demo-token-main,
#portal .stage-c2-demo-token-usage {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#portal .stage-c2-demo-token-main .status-pill {
  justify-self: start;
}

#portal .stage-c2-demo-token-main strong,
#portal .stage-c2-demo-token-main small,
#portal .stage-c2-demo-token-usage span,
#portal .stage-c2-demo-token-usage small {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  #portal .internal-ceig-topbar,
  #portal .stage-c2-demo-create-form,
  #portal .stage-c2-demo-token-row {
    grid-template-columns: 1fr;
  }

  #portal .internal-ceig-topbar .portal-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #portal .stage-c2-demo-token-register-head {
    align-items: stretch;
    flex-direction: column;
  }

  #portal .stage-c2-demo-token-row .small-button {
    width: 100%;
  }
}

/* Stage 8G21 public hero text readability fix */
.sectors-section .sector-hero::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.42) 58%, rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.28), transparent 48%);
}

.sectors-section .sector-hero-content {
  box-sizing: border-box;
  padding: 18px 20px;
  border: 1px solid rgba(240, 193, 104, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(5, 6, 6, 0.86), rgba(13, 22, 21, 0.7));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.sectors-section .sector-hero-content h3 {
  margin-bottom: 8px;
  color: var(--ceig-public-gold-strong);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.sectors-section .sector-hero-content p {
  color: #fffaf0;
  font-weight: 650;
  line-height: 1.52;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

/* Stage A1: shared, simple navigation shell. Scoped to local A1 staging only. */
#portal-grid[data-a1-shell="true"][data-locked="false"] {
  display: block;
}

#portal-grid[data-a1-shell="true"][data-locked="false"] > .portal-login {
  display: none;
}

#portal-grid[data-a1-shell="true"][data-locked="false"] > .portal-board {
  width: 100%;
  min-width: 0;
}


#portal .a1-inline-back,
#portal .a1-legacy-notice button {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(240, 193, 104, 0.4);
  border-radius: 6px;
  background: #151512;
  color: #f6d58e;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#portal .a1-undo-slot {
  padding: 14px clamp(18px, 3vw, 38px) 0;
}

#portal .a1-undo-slot:empty,
#portal .a1-undo-slot .undo-bar.empty {
  display: none;
}

#portal .a1-undo-slot .undo-bar {
  margin: 0;
}

#portal .a1-embedded-panel,
#portal .a1-legacy-panel,
#portal .a1-embedded-panel > .portal-shell,
#portal .a1-legacy-panel > .portal-shell {
  min-width: 0;
  max-width: 100%;
}

#portal .a1-embedded-panel > .portal-shell > .portal-topbar,
#portal .a1-embedded-panel > .portal-shell > .stage8g17b-external-topbar {
  display: none !important;
}

#portal .a1-embedded-panel > .portal-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

#portal .a1-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#portal .a1-channel {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(240, 193, 104, 0.26);
  border-radius: 7px;
  background: #111414;
  color: #f7f3eb;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#portal .a1-channel:hover,
#portal .a1-channel:focus-visible {
  border-color: rgba(240, 193, 104, 0.64);
  background: #171816;
  outline: none;
}

#portal .a1-channel strong {
  color: #ffffff;
  font-size: 17px;
}

#portal .a1-channel span,
#portal .a1-more-heading p,
#portal .a1-empty-state p,
#portal .a1-legacy-notice p {
  color: #c4c8c3;
  line-height: 1.48;
}

#portal .a1-channel small,
#portal .a1-more-list button small {
  color: #f0c168;
  font-weight: 750;
}

#portal .a1-more-list {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

#portal .a1-more-heading {
  margin-bottom: 8px;
}

#portal .a1-more-heading h3,
#portal .a1-empty-state h3,
#portal .a1-legacy-notice h3 {
  margin: 0 0 4px;
  color: #ffffff;
}

#portal .a1-more-heading p,
#portal .a1-empty-state p,
#portal .a1-legacy-notice p {
  margin: 0;
}

#portal .a1-more-list > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111414;
  color: #f7f3eb;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

#portal .a1-more-list > button:hover,
#portal .a1-more-list > button:focus-visible {
  border-color: rgba(240, 193, 104, 0.55);
  outline: none;
}

#portal .a1-more-list > .a1-legacy-entry {
  margin-top: 12px;
  border-color: rgba(240, 193, 104, 0.42);
  background: #181711;
}

#portal .a1-empty-state,
#portal .a1-legacy-notice {
  padding: 20px;
  border: 1px solid rgba(240, 193, 104, 0.28);
  border-radius: 7px;
  background: #111414;
}

#portal .a1-legacy-notice {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#portal .a1-legacy-notice > div {
  min-width: 0;
}

#portal .a1-legacy-notice > div > span {
  color: #f0c168;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a1-inline-back {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  #portal .a1-channel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  #portal .a1-undo-slot {
    padding: 12px 14px 0;
  }

  #portal .a1-more-list > button {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  #portal .a1-legacy-notice {
    align-items: stretch;
    flex-direction: column;
  }

}
#portal .a2j-assembly-start {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f5f2ea;
  letter-spacing: 0;
}

#portal .a2j-assembly-start *,
#portal .a2j-assembly-start *::before,
#portal .a2j-assembly-start *::after {
  box-sizing: border-box;
  min-width: 0;
}

#portal .a2j-assembly-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  align-items: center;
  gap: 24px;
  padding: 22px;
  border: 1px solid rgba(205, 171, 98, 0.28);
  border-radius: 8px;
  background: #151714;
}

#portal .a2j-assembly-head > div > span,
#portal .a2j-assembly-section-head span {
  display: block;
  margin-bottom: 7px;
  color: #d3ad5f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: uppercase;
}

#portal .a2j-assembly-head h3,
#portal .a2j-assembly-section-head h3,
#portal .a2j-assembly-next h3,
#portal .a2j-assembly-empty h3,
#portal .a2j-assembly-order-head h3 {
  margin: 0;
  color: #fffdf8;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-head h3 {
  font-size: 22px;
  line-height: 1.2;
}

#portal .a2j-assembly-head p,
#portal .a2j-assembly-next p,
#portal .a2j-assembly-empty p,
#portal .a2j-assembly-upcoming-list p {
  margin: 8px 0 0;
  color: #c9c9c3;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-primary,
#portal .a2j-assembly-next button,
#portal .a2j-assembly-empty button {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid #d3ad5f;
  border-radius: 7px;
  background: #d3ad5f;
  color: #15130e;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#portal .a2j-assembly-primary:hover,
#portal .a2j-assembly-next button:hover,
#portal .a2j-assembly-empty button:hover {
  background: #e1c27d;
}

#portal .a2j-assembly-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2j-assembly-metrics button {
  display: grid;
  grid-template-rows: auto minmax(34px, auto) auto;
  align-content: start;
  gap: 3px;
  min-height: 102px;
  padding: 14px;
  border: 1px solid rgba(205, 171, 98, 0.19);
  border-radius: 7px;
  background: #191b18;
  color: #f5f2ea;
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

#portal .a2j-assembly-metrics button:hover,
#portal .a2j-assembly-shortcuts button:hover,
#portal .a2j-assembly-upcoming-list button:hover,
#portal .a2j-assembly-checklist button:hover {
  border-color: rgba(211, 173, 95, 0.58);
  background: #20221e;
}

#portal .a2j-assembly-metrics strong {
  color: #e1bd70;
  font-size: 24px;
  line-height: 1;
}

#portal .a2j-assembly-metrics span {
  color: #f6f3ed;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-metrics small {
  color: #9f9f99;
  font-size: 11px;
}

#portal .a2j-assembly-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(280px, 0.86fr);
  gap: 14px;
  align-items: start;
}

#portal .a2j-assembly-order,
#portal .a2j-assembly-upcoming,
#portal .a2j-assembly-empty {
  padding: 20px;
  border: 1px solid rgba(205, 171, 98, 0.2);
  border-radius: 8px;
  background: #131512;
}

#portal .a2j-assembly-order-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

#portal .a2j-assembly-order-head small {
  display: block;
  margin: 8px 0 3px;
  color: #aaa9a2;
  font-size: 11px;
  line-height: 1.35;
}

#portal .a2j-assembly-order-head h3 {
  font-size: 18px;
  line-height: 1.25;
}

#portal .a2j-assembly-order-head p {
  margin: 5px 0 0;
  color: #c4c4bd;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-order-head > button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(211, 173, 95, 0.38);
  border-radius: 6px;
  background: #1b1d1a;
  color: #f1dfb8;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
  cursor: pointer;
}

#portal .a2j-assembly-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(211, 173, 95, 0.35);
  border-radius: 999px;
  background: rgba(211, 173, 95, 0.09);
  color: #e5c982;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(136px, 176px);
  gap: 14px 18px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border-left: 3px solid #d3ad5f;
  border-radius: 6px;
  background: #1c1e1a;
}

#portal .a2j-assembly-next > span {
  grid-column: 1 / -1;
  margin-bottom: -8px;
  color: #d3ad5f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

#portal .a2j-assembly-next h3 {
  font-size: 17px;
  line-height: 1.25;
}

#portal .a2j-assembly-next p {
  margin-top: 5px;
}

#portal .a2j-assembly-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

#portal .a2j-assembly-facts article {
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #191b18;
}

#portal .a2j-assembly-facts span,
#portal .a2j-assembly-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-facts span {
  margin-bottom: 7px;
  color: #9f9f99;
  font-size: 11px;
  line-height: 1.3;
}

#portal .a2j-assembly-facts strong {
  color: #f4f1ea;
  font-size: 13px;
  line-height: 1.35;
}

#portal .a2j-assembly-checklist {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

#portal .a2j-assembly-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 5px;
}

#portal .a2j-assembly-section-head h3 {
  font-size: 17px;
  line-height: 1.25;
}

#portal .a2j-assembly-section-head > small {
  color: #aaa9a2;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

#portal .a2j-assembly-checklist button {
  display: grid;
  grid-template-columns: 28px minmax(110px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #191b18;
  color: #f4f1ea;
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

#portal .a2j-assembly-checklist button > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2a2c27;
  color: #e1bd70;
  font-size: 13px;
  font-weight: 900;
}

#portal .a2j-assembly-checklist button.done > span {
  background: #254536;
  color: #dcf5e6;
}

#portal .a2j-assembly-checklist strong,
#portal .a2j-assembly-checklist small {
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-checklist strong {
  font-size: 12px;
  line-height: 1.35;
}

#portal .a2j-assembly-checklist small {
  color: #b9b9b2;
  font-size: 11px;
  line-height: 1.4;
}

#portal .a2j-assembly-upcoming-list {
  display: grid;
  gap: 8px;
}

#portal .a2j-assembly-upcoming-list button {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #191b18;
  color: #f4f1ea;
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

#portal .a2j-assembly-upcoming-list time {
  color: #e1bd70;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

#portal .a2j-assembly-upcoming-list span,
#portal .a2j-assembly-upcoming-list strong,
#portal .a2j-assembly-upcoming-list small {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-upcoming-list strong {
  font-size: 12px;
  line-height: 1.35;
}

#portal .a2j-assembly-upcoming-list small {
  margin-top: 3px;
  color: #aaa9a2;
  font-size: 11px;
  line-height: 1.35;
}

#portal .a2j-assembly-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#portal .a2j-assembly-shortcuts button {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(205, 171, 98, 0.18);
  border-radius: 7px;
  background: #151714;
  color: #f4f1ea;
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

#portal .a2j-assembly-shortcuts strong,
#portal .a2j-assembly-shortcuts span {
  overflow-wrap: anywhere;
}

#portal .a2j-assembly-shortcuts strong {
  color: #f9f6ef;
  font-size: 13px;
  line-height: 1.35;
}

#portal .a2j-assembly-shortcuts span {
  color: #aaa9a2;
  font-size: 11px;
  line-height: 1.45;
}

#portal .a2j-assembly-empty {
  display: grid;
  justify-items: start;
  gap: 7px;
}

#portal .a2j-assembly-empty > span {
  color: #d3ad5f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a2j-assembly-empty button {
  width: auto;
  min-width: 170px;
  margin-top: 7px;
}

@media (max-width: 980px) {
  #portal .a2j-assembly-layout {
    grid-template-columns: 1fr;
  }

  #portal .a2j-assembly-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #portal .a2j-assembly-head,
  #portal .a2j-assembly-next {
    grid-template-columns: 1fr;
  }

  #portal .a2j-assembly-primary,
  #portal .a2j-assembly-next button {
    width: 100%;
  }

  #portal .a2j-assembly-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #portal .a2j-assembly-shortcuts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #portal .a2j-assembly-start {
    gap: 12px;
  }

  #portal .a2j-assembly-head,
  #portal .a2j-assembly-order,
  #portal .a2j-assembly-upcoming,
  #portal .a2j-assembly-empty {
    padding: 15px;
  }

  #portal .a2j-assembly-head h3 {
    font-size: 20px;
  }

  #portal .a2j-assembly-order-head {
    grid-template-columns: 1fr;
  }

  #portal .a2j-assembly-order-head > button {
    width: 100%;
  }

  #portal .a2j-assembly-facts {
    grid-template-columns: 1fr 1fr;
  }

  #portal .a2j-assembly-checklist button {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  #portal .a2j-assembly-checklist button small {
    grid-column: 2;
  }

  #portal .a2j-assembly-upcoming-list button {
    grid-template-columns: 1fr;
  }

  #portal .a2j-assembly-section-head {
    align-items: start;
    flex-direction: column;
  }

  #portal .a2j-assembly-section-head > small {
    text-align: left;
  }
}

/* Stage A3A: one read-only RFQ review surface. */
#portal .a2b-case-helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#portal .a2b-case-helper-row .a2b-case-helper {
  flex: 1 1 220px;
  min-width: 0;
}

#portal .a2b-case-helper-row .a2b-case-helper.primary {
  border-color: #8d959f;
  background: #f1f3f5;
  color: #111315;
}

#portal .a3a-rfq-review {
  display: grid;
  gap: 16px;
  min-width: 0;
  color: #f4f5f6;
}

#portal .a3a-rfq-review :where(button, a, strong, span, small, p, pre, label, h3, h4) {
  min-width: 0;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

#portal .a3a-rfq-review button {
  white-space: normal;
}

#portal .a3a-rfq-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 20px;
  border: 1px solid #34383e;
  background: #111315;
}

#portal .a3a-rfq-topbar > button,
#portal .a3a-rfq-mail-head > button,
#portal .a3a-rfq-empty button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #4a5058;
  background: #1b1e22;
  color: #f4f5f6;
  cursor: pointer;
}

#portal .a3a-rfq-topbar > div > span,
#portal .a3a-rfq-recipients > div > span,
#portal .a3a-rfq-mail-head > div > span,
#portal .a3a-rfq-checks > div > span,
#portal .a3a-rfq-empty > span {
  display: block;
  margin-bottom: 5px;
  color: #b6bbc2;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a3a-rfq-topbar h3,
#portal .a3a-rfq-recipients h3,
#portal .a3a-rfq-mail-head h3,
#portal .a3a-rfq-checks h3,
#portal .a3a-rfq-empty h3 {
  margin: 0;
  color: #ffffff;
  font-size: 21px;
  line-height: 1.25;
}

#portal .a3a-rfq-topbar p,
#portal .a3a-rfq-recipients p,
#portal .a3a-rfq-mail-head p,
#portal .a3a-rfq-empty p {
  margin: 7px 0 0;
  color: #c4c8cd;
  line-height: 1.55;
}

#portal .a3a-rfq-topbar > strong {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #4b5159;
  background: #1b1e22;
  color: #d9dde1;
  font-size: 12px;
}

#portal .a3a-rfq-topbar > strong.ready,
#portal .a3a-rfq-recipient-list em.ready {
  border-color: #2e7055;
  color: #a8e4c8;
}

#portal .a3a-rfq-topbar > strong.blocked,
#portal .a3a-rfq-recipient-list em.blocked {
  border-color: #745a31;
  color: #f1d395;
}

#portal .a3a-rfq-safety {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid #3a4047;
  background: #171a1e;
}

#portal .a3a-rfq-safety strong {
  color: #ffffff;
}

#portal .a3a-rfq-safety span {
  color: #bfc4ca;
  text-align: right;
}

#portal .a3b-server-gate {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #111827;
}

#portal .a3b-server-gate > div > span {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a3b-server-gate h3 {
  margin: 6px 0 8px;
  color: #f8fafc;
  font-size: 18px;
}

#portal .a3b-server-gate p,
#portal .a3b-server-gate small {
  color: #cbd5e1;
}

#portal .a3b-server-gate ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#portal .a3b-server-gate li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b1220;
}

#portal .a3b-server-gate li b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #1f2937;
  color: #e2e8f0;
}

#portal .a3b-server-gate li.done b {
  background: #14532d;
  color: #dcfce7;
}

#portal .a3b-server-gate li.pending b {
  background: #7c2d12;
  color: #ffedd5;
}

#portal .a3b-server-gate li span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#portal .a3b-server-gate li strong,
#portal .a3b-server-gate li small {
  overflow-wrap: anywhere;
}

#portal .a3b-server-gate li strong {
  color: #f8fafc;
}

#portal .a3a-rfq-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

#portal .a3a-rfq-cases button {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #353a40;
  background: #15181b;
  color: #f3f4f5;
  text-align: left;
  cursor: pointer;
}

#portal .a3a-rfq-cases button.active {
  border-color: #a5abb2;
  background: #25292e;
}

#portal .a3a-rfq-cases button span {
  color: #b7bcc3;
  font-size: 12px;
}

#portal .a3a-rfq-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#portal .a3a-rfq-summary article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #34383e;
  background: #131518;
}

#portal .a3a-rfq-summary strong {
  color: #ffffff;
  font-size: 22px;
}

#portal .a3a-rfq-summary span {
  color: #b8bdc4;
  font-size: 12px;
}

#portal .a3a-rfq-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
}

#portal .a3a-rfq-recipients,
#portal .a3a-rfq-mail,
#portal .a3a-rfq-checks,
#portal .a3a-rfq-empty {
  min-width: 0;
  padding: 16px;
  border: 1px solid #34383e;
  background: #111315;
}

#portal .a3a-rfq-recipient-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  margin-top: 14px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

#portal .a3a-rfq-recipient-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid #33383e;
  background: #191c20;
  color: #eef0f2;
  text-align: left;
  cursor: pointer;
}

#portal .a3a-rfq-recipient-list button.active {
  border-color: #a0a6ad;
  background: #282d32;
}

#portal .a3a-rfq-recipient-list button span {
  display: grid;
  gap: 4px;
}

#portal .a3a-rfq-recipient-list small {
  color: #b9bec5;
}

#portal .a3a-rfq-recipient-list em {
  padding: 5px 7px;
  border: 1px solid #4b5159;
  color: #c8cdd2;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

#portal .a3a-rfq-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#portal .a3a-rfq-mail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

#portal .a3a-rfq-mail-fields {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

#portal .a3a-rfq-mail-fields label {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #30353b;
  background: #181b1f;
}

#portal .a3a-rfq-mail-fields label > span {
  color: #aeb4bb;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a3a-rfq-mail-fields label > strong {
  color: #ffffff;
  line-height: 1.45;
}

#portal .a3a-rfq-mail-fields pre {
  max-height: 410px;
  margin: 0;
  overflow: auto;
  color: #e7e9eb;
  font: inherit;
  line-height: 1.6;
  white-space: pre-wrap;
}

#portal .a3a-rfq-checks {
  display: grid;
  gap: 9px;
}

#portal .a3a-rfq-checks > article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid #30353b;
  background: #181b1f;
}

#portal .a3a-rfq-checks > article b {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #59616a;
  color: #d9dde1;
}

#portal .a3a-rfq-checks > article.done b {
  border-color: #2e7055;
  color: #a8e4c8;
}

#portal .a3a-rfq-checks > article.pending b {
  border-color: #745a31;
  color: #f1d395;
}

#portal .a3a-rfq-checks > article span {
  display: grid;
  gap: 3px;
}

#portal .a3a-rfq-checks > article small {
  color: #b8bdc4;
  line-height: 1.45;
}

#portal .a3a-rfq-review .stage6-rfq-review,
#portal .a3a-rfq-review .stage6-rfq-pdf-preview,
#portal .a3a-rfq-review .stage6-rfq-files-preview,
#portal .a3a-rfq-review .stage6-rfq-doc-card,
#portal .a3a-rfq-review .stage6-rfq-review-stats span {
  border-color: #34383e !important;
  background: #111315 !important;
  color: #f1f3f4 !important;
}

#portal .a3a-rfq-review .stage6-rfq-pdf-preview pre {
  max-height: 440px;
  overflow: auto;
}

#portal .a3a-rfq-empty {
  min-height: 260px;
  align-content: center;
  justify-items: start;
}

@media (max-width: 980px) {
  #portal .a3b-server-gate,
  #portal .a3a-rfq-topbar,
  #portal .a3a-rfq-layout {
    grid-template-columns: 1fr;
  }

  #portal .a3a-rfq-topbar > button,
  #portal .a3a-rfq-topbar > strong {
    justify-self: start;
  }

  #portal .a3a-rfq-recipient-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 360px;
  }
}

@media (max-width: 680px) {
  #portal .a3a-rfq-summary,
  #portal .a3a-rfq-recipient-list {
    grid-template-columns: 1fr 1fr;
  }

  #portal .a3a-rfq-safety,
  #portal .a3a-rfq-mail-head {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  #portal .a3a-rfq-safety {
    display: grid;
  }

  #portal .a3a-rfq-safety span {
    text-align: left;
  }

  #portal .a3a-rfq-mail-head > button {
    width: 100%;
  }
}

@media (max-width: 440px) {
  #portal .a3a-rfq-cases,
  #portal .a3a-rfq-summary,
  #portal .a3a-rfq-recipient-list {
    grid-template-columns: 1fr;
  }

  #portal .a3a-rfq-topbar,
  #portal .a3a-rfq-recipients,
  #portal .a3a-rfq-mail,
  #portal .a3a-rfq-checks,
  #portal .a3a-rfq-empty {
    padding: 13px;
  }

  #portal .a3a-rfq-recipient-list button {
    grid-template-columns: 1fr;
  }

  #portal .a3a-rfq-recipient-list em {
    justify-self: start;
  }
}

/* A3D: controlled RFQ test gate. */
#portal .a3d-test-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid #69c38b;
  border-radius: 8px;
  background: #101315;
  color: #f4f6f5;
  overflow: hidden;
}

#portal .a3d-test-gate-copy,
#portal .a3d-test-gate-action {
  min-width: 0;
}

#portal .a3d-test-gate-copy > span,
#portal .a3d-test-gate-action > small {
  display: block;
  margin-bottom: 6px;
  color: #aeb8b3;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

#portal .a3d-test-gate-copy h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.25;
}

#portal .a3d-test-gate-copy p,
#portal .a3d-test-gate-action em,
#portal .a3d-test-gate-notice {
  margin: 0;
  color: #c7ceca;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#portal .a3d-test-gate-action {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #171b1d;
}

#portal .a3d-test-gate-action strong {
  color: #ffffff;
  font-size: 16px;
  overflow-wrap: anywhere;
}

#portal .a3d-test-gate-action button {
  min-height: 44px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #69c38b;
  border-radius: 6px;
  background: #e9f6ee;
  color: #0a2a17;
  font: inherit;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#portal .a3d-test-gate-action button:disabled {
  border-color: rgba(255, 255, 255, 0.15);
  background: #2a2f31;
  color: #9ba39f;
  cursor: not-allowed;
}

#portal .a3d-test-gate-action em {
  font-size: 12px;
  font-style: normal;
}

#portal .a3d-test-gate-notice {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #080a0b;
}

@media (max-width: 760px) {
  #portal .a3d-test-gate {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }
}

/* A3F: simple department work and case-scoped communication. */
#portal .a3f-work,
#portal .a3f-messages,
#portal .a3f-empty {
  min-width: 0;
  color: #f7f9f8;
}

#portal .a3f-work-head,
#portal .a3f-messages > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #101315;
}

#portal .a3f-work-head > div:first-child,
#portal .a3f-messages > header > div {
  min-width: 0;
  max-width: 760px;
}

#portal .a3f-work-head span,
#portal .a3f-messages > header span,
#portal .a3f-work-next > span,
#portal .a3f-work-title span {
  display: block;
  margin-bottom: 6px;
  color: #8dd6aa;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a3f-work-head h3,
#portal .a3f-messages > header h3,
#portal .a3f-work-title h3,
#portal .a3f-work-next h3,
#portal .a3f-message-thread-head h3,
#portal .a3f-empty h3 {
  margin: 0 0 7px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#portal .a3f-work-head p,
#portal .a3f-messages > header p,
#portal .a3f-work-title p,
#portal .a3f-work-next p,
#portal .a3f-empty p {
  margin: 0;
  color: #c7ceca;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#portal .a3f-work-head > div:last-child,
#portal .a3f-messages > header > strong {
  flex: 0 0 auto;
  display: grid;
  min-width: 110px;
  gap: 3px;
  text-align: right;
}

#portal .a3f-work-head > div:last-child strong,
#portal .a3f-messages > header > strong {
  color: #ffffff;
  font-size: 28px;
}

#portal .a3f-work-head > div:last-child small {
  color: #aeb8b3;
  overflow-wrap: anywhere;
}

#portal .a3f-message-summary {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: none;
}

#portal .a3f-messages > header .a3f-message-summary > span {
  display: grid;
  place-items: center;
  min-width: 96px;
  min-height: 58px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #171b1d;
  color: #c7ceca;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
}

#portal .a3f-message-summary strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

#portal .a3f-work-layout,
#portal .a3f-message-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  min-width: 0;
}

#portal .a3f-work-list,
#portal .a3f-message-cases,
#portal .a3f-work-detail,
#portal .a3f-message-thread {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #101315;
}

#portal .a3f-work-list,
#portal .a3f-message-cases {
  max-height: 590px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#portal .a3f-work-list > div,
#portal .a3f-message-cases > div {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#portal .a3f-work-list > div small,
#portal .a3f-message-cases > div small {
  color: #aeb8b3;
}

#portal .a3f-work-list > button,
#portal .a3f-message-cases > button {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

#portal .a3f-work-list > button:hover,
#portal .a3f-work-list > button.active,
#portal .a3f-message-cases > button:hover,
#portal .a3f-message-cases > button.active {
  background: #1a201d;
  box-shadow: inset 3px 0 0 #69c38b;
}

#portal .a3f-work-list button span,
#portal .a3f-work-list button strong,
#portal .a3f-work-list button small,
#portal .a3f-message-cases button strong,
#portal .a3f-message-cases button small {
  min-width: 0;
  overflow-wrap: anywhere;
}

#portal .a3f-work-list button span,
#portal .a3f-message-cases button {
  display: grid;
  gap: 4px;
}

#portal .a3f-work-list button small,
#portal .a3f-message-cases button small {
  color: #aeb8b3;
}

#portal .a3f-work-list button em {
  flex: 0 0 auto;
  max-width: 96px;
  color: #b9c4bf;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
  text-align: right;
  overflow-wrap: anywhere;
}

#portal .a3f-work-list button em.attention {
  color: #ffce78;
}

#portal .a3f-work-list button em.ready {
  color: #8dd6aa;
}

#portal .a3f-work-detail,
#portal .a3f-message-thread {
  padding: 16px;
}

#portal .a3f-work-title,
#portal .a3f-message-thread-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#portal .a3f-work-title > div,
#portal .a3f-message-thread-head > div {
  min-width: 0;
}

#portal .a3f-work-title > button,
#portal .a3f-work-next > button,
#portal .a3f-message-thread-head > button,
#portal .a3f-work-messages,
#portal .a3f-messages form button,
#portal .a3f-empty button {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #69c38b;
  border-radius: 6px;
  background: #e9f6ee;
  color: #0b2816;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#portal .a3f-work-next {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(105, 195, 139, 0.35);
  border-radius: 7px;
  background: #151c18;
}

#portal .a3f-work-next > button {
  margin-top: 13px;
}

#portal .a3f-work-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

#portal .a3f-work-facts article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #171b1d;
}

#portal .a3f-work-facts span,
#portal .a3f-work-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

#portal .a3f-work-facts span {
  margin-bottom: 5px;
  color: #aeb8b3;
  font-size: 11px;
  text-transform: uppercase;
}

#portal .a3f-work-facts strong {
  color: #ffffff;
  font-size: 15px;
}

#portal .a3f-work-messages {
  display: grid;
  width: 100%;
  gap: 3px;
  margin-top: 12px;
  background: #171b1d;
  color: #ffffff;
  text-align: left;
}

#portal .a3f-work-messages span {
  color: #aeb8b3;
  font-weight: 500;
}

#portal .a3f-message-list {
  display: grid;
  gap: 9px;
  max-height: 360px;
  margin-top: 14px;
  padding-right: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#portal .a3f-message-list article {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #171b1d;
}

#portal .a3f-message-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#portal .a3f-message-list article span,
#portal .a3f-message-list article p,
#portal .a3f-message-empty span {
  color: #b9c2be;
}

#portal .a3f-message-list article p {
  margin: 8px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#portal .a3f-message-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: #101315;
}

#portal .a3f-messages form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#portal .a3f-messages form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#portal .a3f-messages form label span,
#portal .a3f-messages form > small {
  color: #aeb8b3;
  font-size: 12px;
}

#portal .a3f-messages form textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #080a0b;
  color: #ffffff;
  font: inherit;
}

#portal .a3f-messages form > small {
  grid-column: 1 / -1;
  line-height: 1.45;
}

#portal .a3f-empty {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #101315;
}

#portal .a3f-empty button {
  margin-top: 14px;
}

@media (max-width: 920px) {
  #portal .a3f-work-layout,
  #portal .a3f-message-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a3f-work-list,
  #portal .a3f-message-cases {
    max-height: 250px;
  }

  #portal .a3f-work-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #portal .a3f-work-head,
  #portal .a3f-messages > header,
  #portal .a3f-work-title,
  #portal .a3f-message-thread-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a3f-work-head > div:last-child,
  #portal .a3f-messages > header > strong {
    min-width: 0;
    text-align: left;
  }

  #portal .a3f-message-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #portal .a3f-messages > header .a3f-message-summary > span {
    min-width: 0;
  }

  #portal .a3f-work-title > button,
  #portal .a3f-message-thread-head > button,
  #portal .a3f-messages form button {
    width: 100%;
  }

  #portal .a3f-work-facts,
  #portal .a3f-messages form {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* A6: unified simple panels based on the accepted demo shell. */
.a6-simple-shell,
.a6-simple-shell * {
  box-sizing: border-box;
}

.a6-simple-shell {
  background: #090b0e;
  color: #f5f7f8;
  min-width: 0;
  overflow-x: clip;
}

.a6-simple-shell .a1-main,
.a6-simple-shell .a1-content,
.a6-simple-shell .a1-embedded-panel,
.a6-simple-shell .a1-legacy-panel {
  min-width: 0;
  max-width: 100%;
}

.a6-simple-shell .a1-content {
  width: min(100%, 1180px);
}

.a6-simple-shell button,
.a6-simple-shell input,
.a6-simple-shell select,
.a6-simple-shell textarea,
.a6-simple-shell pre {
  min-width: 0;
  max-width: 100%;
}

.a6-simple-shell button,
.a6-simple-shell button * {
  white-space: normal;
  overflow-wrap: anywhere;
}

.a6-simple-start {
  display: grid;
  gap: 18px;
}

.a6-start-head,
.a6-section-head {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.a6-start-head {
  border-bottom: 1px solid #2a3037;
  padding: 0 0 18px;
}

.a6-start-head > div,
.a6-section-head > div {
  min-width: 0;
}

.a6-start-head span,
.a6-section-head span {
  color: #9ea7b0;
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.a6-start-head h3,
.a6-section-head h3 {
  color: #ffffff;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.a6-start-head p {
  color: #c5cbd1;
  line-height: 1.55;
  margin: 8px 0 0;
  max-width: 720px;
}

.a6-start-head > strong {
  background: #14191f;
  border: 1px solid #333b44;
  border-radius: 8px;
  color: #ffffff;
  flex: 0 0 auto;
  font-size: 14px;
  padding: 10px 14px;
}

.a6-primary-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.a6-primary-actions > button {
  align-items: flex-start;
  background: #12171c;
  border: 1px solid #303841;
  border-radius: 8px;
  color: #f5f7f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 112px;
  padding: 18px;
  text-align: left;
}

.a6-primary-actions > button.primary {
  background: #f3f5f6;
  border-color: #f3f5f6;
  color: #101317;
}

.a6-primary-actions > button:hover,
.a6-primary-actions > button:focus-visible {
  border-color: #ffffff;
  outline: 2px solid transparent;
  transform: translateY(-1px);
}

.a6-primary-actions strong {
  font-size: 16px;
  line-height: 1.25;
}

.a6-primary-actions span {
  color: #aeb6be;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 7px;
}

.a6-primary-actions .primary span {
  color: #4b545d;
}

.a6-metrics {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #2d343c;
  border-radius: 8px;
}

.a6-metrics article {
  background: #101419;
  min-width: 0;
  padding: 14px 16px;
}

.a6-metrics strong,
.a6-metrics span {
  display: block;
}

.a6-metrics strong {
  color: #ffffff;
  font-size: 22px;
}

.a6-metrics span {
  color: #aab2bb;
  font-size: 12px;
  margin-top: 3px;
}

.a6-work-preview {
  background: #0e1216;
  border: 1px solid #2a3138;
  border-radius: 8px;
  padding: 18px;
}

.a6-section-head {
  margin-bottom: 12px;
}

.a6-section-head h3 {
  font-size: 18px;
}

.a6-section-head button {
  background: transparent;
  border: 1px solid #3a434c;
  border-radius: 6px;
  color: #ffffff;
  min-height: 40px;
  padding: 8px 12px;
}

.a6-preview-list {
  display: grid;
  gap: 8px;
}

.a6-preview-list > button {
  align-items: center;
  background: #14191f;
  border: 1px solid #293139;
  border-radius: 6px;
  color: #f5f7f8;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  min-height: 66px;
  padding: 12px 14px;
  text-align: left;
}

.a6-preview-list > button > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.a6-preview-list > button > span:last-child {
  align-items: flex-end;
  text-align: right;
}

.a6-preview-list small {
  color: #9fa8b1;
  line-height: 1.35;
}

.a6-preview-list strong,
.a6-preview-list em {
  color: #ffffff;
  font-style: normal;
  line-height: 1.35;
}

.a6-simple-shell .a3f-work,
.a6-simple-shell .a3f-messages,
.a6-simple-shell .a2b-admin-work,
.a6-simple-shell .a2c-admin-messages,
.a6-simple-shell .a1-more-list,
.a6-simple-shell .a5-message-actions,
.a6-simple-shell .a1-channel-grid {
  min-width: 0;
  max-width: 100%;
}

.a6-simple-shell .a3f-work,
.a6-simple-shell .a3f-messages,
.a6-simple-shell .a2b-admin-work,
.a6-simple-shell .a2c-admin-messages {
  background: #0e1216;
  border: 1px solid #2b333b;
  border-radius: 8px;
}

.a6-simple-shell .a3f-work-layout,
.a6-simple-shell .a3f-message-layout,
.a6-simple-shell .a2b-work-layout,
.a6-simple-shell .a2c-message-layout {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

.a6-simple-shell .a1-more-list {
  display: grid;
  gap: 8px;
}

.a6-simple-shell .a1-more-list > button {
  align-items: center;
  background: #12171c;
  border: 1px solid #2d353d;
  border-radius: 6px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 14px;
  text-align: left;
}

.a6-simple-shell .a1-more-list > button small {
  color: #9fa8b1;
}

@media (max-width: 820px) {
  .a6-start-head,
  .a6-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .a6-start-head > strong,
  .a6-section-head button {
    align-self: flex-start;
  }

  .a6-primary-actions,
  .a6-metrics {
    grid-template-columns: 1fr;
  }

  .a6-primary-actions > button {
    min-height: 86px;
  }

  .a6-preview-list > button,
  .a6-simple-shell .a3f-work-layout,
  .a6-simple-shell .a3f-message-layout,
  .a6-simple-shell .a2b-work-layout,
  .a6-simple-shell .a2c-message-layout {
    grid-template-columns: 1fr;
  }

  .a6-preview-list > button > span:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .a6-simple-shell .a1-content {
    padding-bottom: 92px;
  }
}

@media (max-width: 420px) {
  .a6-simple-shell .a1-main,
  .a6-simple-shell .a1-content,
  .a6-simple-start,
  .a6-work-preview {
    width: 100%;
  }

  .a6-start-head h3 {
    font-size: 21px;
  }

  .a6-work-preview {
    padding: 14px;
  }
}

/* A6A: simple mail surface. Advanced mailbox data remains available only on demand. */
.a6-simple-shell .a6a-simple-mail,
.a6-simple-shell .a6a-mail-detail {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 940px;
  min-width: 0;
  width: 100%;
}

.a6-simple-shell .a6a-mail-head {
  align-items: flex-start;
  background: #101419;
  border: 1px solid #2d353d;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.a6-simple-shell .a6a-mail-head span,
.a6-simple-shell .a6a-mail-detail > header > span {
  color: #aeb7c0;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.a6-simple-shell .a6a-mail-head h3,
.a6-simple-shell .a6a-mail-detail h3 {
  color: #ffffff;
  font-size: 22px;
  margin: 0 0 5px;
}

.a6-simple-shell .a6a-mail-head p,
.a6-simple-shell .a6a-mail-detail p,
.a6-simple-shell .a6a-mail-detail small {
  color: #aeb7c0;
  margin: 0;
}

.a6-simple-shell .a6a-mail-actions,
.a6-simple-shell .a6a-mail-actions form,
.a6-simple-shell .a6a-mail-filters,
.a6-simple-shell .a6a-mail-summary,
.a6-simple-shell .a6a-mail-detail-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.a6-simple-shell .a6a-mail-actions button,
.a6-simple-shell .a6a-mail-filters button,
.a6-simple-shell .a6a-back,
.a6-simple-shell .a6a-mail-detail-actions > button,
.a6-simple-shell .a6a-mail-detail-actions summary {
  background: #171d23;
  border: 1px solid #343e48;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  padding: 9px 13px;
  white-space: normal;
}

.a6-simple-shell .a6a-mail-actions .primary,
.a6-simple-shell .a6a-mail-filters .active {
  background: #ffffff;
  border-color: #ffffff;
  color: #0d1115;
}

.a6-simple-shell .a6a-mail-summary {
  background: #101419;
  border: 1px solid #2d353d;
  border-radius: 8px;
  padding: 12px 16px;
}

.a6-simple-shell .a6a-mail-summary strong {
  color: #ffffff;
  font-size: 20px;
}

.a6-simple-shell .a6a-mail-summary span {
  color: #aeb7c0;
  margin-right: 12px;
}

.a6-simple-shell .a6a-mail-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}

.a6-simple-shell .a6a-mail-toolbar label {
  color: #aeb7c0;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.a6-simple-shell .a6a-mail-toolbar input {
  background: #101419;
  border: 1px solid #343e48;
  border-radius: 6px;
  color: #ffffff;
  min-height: 42px;
  min-width: 0;
  padding: 9px 11px;
  width: 100%;
}

.a6-simple-shell .a6a-mail-list {
  background: #101419;
  border: 1px solid #2d353d;
  border-radius: 8px;
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.a6-simple-shell .a6a-mail-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #28313a;
  border-radius: 0;
  color: #ffffff;
  display: grid;
  gap: 12px;
  grid-template-columns: 92px minmax(0, 1fr) minmax(120px, 190px);
  min-height: 72px;
  min-width: 0;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.a6-simple-shell .a6a-mail-row:last-child {
  border-bottom: 0;
}

.a6-simple-shell .a6a-mail-row:hover,
.a6-simple-shell .a6a-mail-row:focus-visible {
  background: #171d23;
}

.a6-simple-shell .a6a-mail-status {
  color: #aeb7c0;
  font-size: 12px;
  font-weight: 700;
}

.a6-simple-shell .a6a-mail-row.needs-action .a6a-mail-status {
  color: #f2c879;
}

.a6-simple-shell .a6a-mail-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.a6-simple-shell .a6a-mail-copy strong,
.a6-simple-shell .a6a-mail-copy small,
.a6-simple-shell .a6a-mail-context {
  min-width: 0;
  overflow-wrap: anywhere;
}

.a6-simple-shell .a6a-mail-copy small,
.a6-simple-shell .a6a-mail-context,
.a6-simple-shell .a6a-mail-more {
  color: #9fa8b1;
  font-size: 12px;
}

.a6-simple-shell .a6a-mail-context {
  text-align: right;
}

.a6-simple-shell .a6a-mail-more {
  margin: 0;
  text-align: center;
}

.a6-simple-shell .a6a-mail-tools,
.a6-simple-shell .a6a-mail-detail > header,
.a6-simple-shell .a6a-mail-body,
.a6-simple-shell .a6a-mail-files,
.a6-simple-shell .a6a-compose {
  background: #101419;
  border: 1px solid #2d353d;
  border-radius: 8px;
  min-width: 0;
  padding: 16px;
}

.a6-simple-shell .a6a-mail-tools > summary {
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.a6-simple-shell .a6a-mail-detail-actions details {
  min-width: min(100%, 560px);
}

.a6-simple-shell .a6a-mail-detail-actions details[open] {
  flex-basis: 100%;
}

.a6-simple-shell .a6a-mail-detail-actions summary {
  display: inline-flex;
  list-style: none;
}

.a6-simple-shell .a6a-mail-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.a6-simple-shell .a6a-mail-files strong {
  flex-basis: 100%;
}

.a6-simple-shell .a6a-mail-files a,
.a6-simple-shell .a6a-mail-files span {
  color: #d8dee4;
}

.a6-simple-shell .a6a-mail-body pre {
  color: #d8dee4;
  font-family: inherit;
  margin: 10px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .a6-simple-shell .a6a-mail-head,
  .a6-simple-shell .a6a-mail-toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .a6-simple-shell .a6a-mail-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .a6-simple-shell .a6a-mail-context {
    text-align: left;
  }
}

/* A6B staging: compact recipient chooser for a new CEIG chat. */
#portal .a6b-recipient-chooser {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding: 16px;
  overflow: hidden;
}

#portal .a6b-recipient-head {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

#portal .a6b-recipient-head > div {
  min-width: 0;
}

#portal .a6b-recipient-head span {
  display: block;
  margin-bottom: 4px;
  color: #d8bd7a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a6b-recipient-head h3,
#portal .a6b-recipient-head p {
  margin: 0;
  overflow-wrap: anywhere;
}

#portal .a6b-recipient-head p {
  margin-top: 5px;
  color: #b9c2be;
  line-height: 1.45;
}

#portal .a6b-recipient-head > strong {
  display: grid;
  flex: 0 0 auto;
  min-width: 70px;
  justify-items: end;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

#portal .a6b-recipient-head > strong small {
  margin-top: 5px;
  color: #b9c2be;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#portal .a6b-recipient-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  max-height: 356px;
  padding: 0 6px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#portal .a6b-recipient-list .a6b-recipient-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-content: center;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: #080a0b;
  color: #ffffff;
  text-align: left;
  white-space: normal;
}

#portal .a6b-recipient-list .a6b-recipient-button:hover,
#portal .a6b-recipient-list .a6b-recipient-button:focus-visible {
  border-color: #d8bd7a;
  background: #15191b;
}

#portal .a6b-recipient-list .a6b-recipient-button strong,
#portal .a6b-recipient-list .a6b-recipient-button small {
  grid-column: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

#portal .a6b-recipient-list .a6b-recipient-button strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.3;
  text-transform: none;
}

#portal .a6b-recipient-list .a6b-recipient-button small {
  color: #b9c2be;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 680px) {
  #portal .a6b-recipient-chooser {
    padding: 13px;
  }

  #portal .a6b-recipient-head {
    align-items: flex-start;
  }

  #portal .a6b-recipient-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
    padding-right: 0;
    overflow-y: visible;
    scrollbar-gutter: auto;
  }

  #portal .a6b-recipient-head > strong {
    min-width: 54px;
    font-size: 20px;
  }
}

#portal .a6b-chat-thread {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

#portal .a6b-chat-head,
#portal .a6b-chat-form {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #101315;
}

#portal .a6b-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

#portal .a6b-chat-head > div {
  min-width: 0;
}

#portal .a6b-chat-head span {
  display: block;
  margin-bottom: 4px;
  color: #d8bd7a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#portal .a6b-chat-head h3,
#portal .a6b-chat-head p {
  margin: 0;
  overflow-wrap: anywhere;
}

#portal .a6b-chat-head p {
  margin-top: 4px;
  color: #b9c2be;
}

#portal .a6b-chat-head button {
  flex: 0 0 auto;
  white-space: normal;
}

#portal .a6b-chat-messages {
  min-width: 0;
  min-height: 120px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
}

#portal .a6b-chat-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

#portal .a6b-chat-form textarea,
#portal .a6b-chat-form input,
#portal .a6b-chat-form select {
  min-width: 0;
  max-width: 100%;
}

#portal .a6b-chat-attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

#portal .a6b-chat-attachments label {
  min-width: 0;
  overflow: hidden;
}

#portal .a6b-chat-options {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #080a0b;
}

#portal .a6b-chat-options > summary {
  color: #d8bd7a;
  cursor: pointer;
  font-weight: 800;
  overflow-wrap: anywhere;
}

#portal .a6b-chat-options[open] {
  display: grid;
  gap: 10px;
}

#portal .a6b-chat-options p {
  margin: 0;
  color: #b9c2be;
}

#portal .demo-requests-admin > .form-status,
#portal .demo-requests-admin > .demo-request-warning p {
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#portal .demo-requests-admin [data-demo-request-recover] {
  min-height: 44px;
  font-size: 16px;
  line-height: 1.4;
  text-transform: none;
  white-space: normal;
}

#portal .demo-requests-admin > .form-status:focus,
#portal .demo-requests-admin [data-demo-request-recover]:focus-visible {
  outline: 3px solid #bce5c5;
  outline-offset: 3px;
}

#portal .a6b-chat-privacy {
  margin: 0;
  color: #b9c2be;
  font-size: 12px;
}

@media (max-width: 680px) {
  #portal .a6b-chat-head {
    align-items: flex-start;
  }

  #portal .a6b-chat-attachments {
    grid-template-columns: minmax(0, 1fr);
  }

  #portal .a6b-chat-form .mini-actions,
  #portal .a6b-chat-form .mini-actions button {
    width: 100%;
  }
}

/* R16: comparison remains readable inside native workflow. */
.workflow-main-grid:has(.offer-matrix-panel) { grid-template-columns: minmax(0, 1fr); }
.offer-matrix-panel .matrix-head, .offer-matrix-panel .offer-matrix-table > article { min-width: 780px; }
.r16-decision-history { overflow-wrap: anywhere; }
.workflow-main-grid .offer-matrix-panel .offer-matrix-table { overflow-x: auto; max-width: 100%; }
.workflow-main-grid .offer-matrix-panel .offer-matrix-table .matrix-head,
.workflow-main-grid .offer-matrix-panel .offer-matrix-table > article { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(90px, 1fr)); }
.r16-decision-history article { margin-top: 12px; padding-top: 12px; border-top: 1px solid currentColor; }

/* R17: native comparison, desktop and mobile. */
.r17-comparison{min-width:0;max-width:100%}
.r17-assessment{padding:16px;background:#eef6f7;border:1px solid #ccdfe2;border-radius:12px;overflow-wrap:anywhere}
.r17-comparison[data-comparable="false"] .r17-assessment{background:#fff4e2;border-color:#e7cc98}
.r17-table-scroll{overflow-x:auto;max-width:100%;margin-top:16px;border:1px solid #ccdfe2;border-radius:10px}
.r17-dimensions{width:100%;min-width:820px;border-collapse:collapse;table-layout:fixed}
.r17-dimensions th,.r17-dimensions td{padding:14px;text-align:left;vertical-align:top;border-bottom:1px solid #dce6e8;overflow-wrap:anywhere}
.r17-dimensions th{background:#f0f5f6}.r17-dimensions th:first-child{width:200px}
.r17-dimensions ul{padding-left:18px;margin:0}.r17-global-issues{padding-left:24px}
.r17-comparison .r17-assessment,.r17-comparison .r17-assessment p,
.r17-comparison .r17-assessment small,.r17-comparison .r17-assessment strong,
.r17-comparison .r17-dimensions th{color:#172e35!important}
.r17-comparison .r17-assessment *{color:#172e35!important}
#portal-board .workflow-center .offer-matrix-panel.r17-comparison .r17-assessment *{color:#172e35!important}

/* R18 scoped change review: wrap long identifiers on narrow screens. */
#portal-board .workflow-center .r18-review, #portal-board .workflow-center .r18-decision-status {background:#f0f6f7;color:#172e35!important;border:1px solid #afc9ce;border-radius:12px;padding:12px;overflow-wrap:anywhere;}
#portal-board .workflow-center .r18-review * {color:#172e35!important;}
.r18-review article {border-top:1px solid #afc9ce;margin-top:12px;padding-top:8px;}
.r18-review dl>div {display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);gap:8px;margin:8px 0;}
.r18-review dd {margin:0;}
.r18-review dd span {display:block;}
@media(max-width:600px){.r18-review dl>div{grid-template-columns:minmax(0,1fr);gap:3px;}}

/* R19: status per part in the existing native pipeline. */
.r19-split-decisions { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line, #47606b); border-radius: 12px; }
.r19-split-decisions article { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .8rem 0; border-top: 1px solid var(--line, #47606b); }
.r19-split-decisions p, .r19-split-decisions strong, .r19-split-decisions small { overflow-wrap: anywhere; }
@media (max-width: 600px) { .r19-split-decisions article { align-items: stretch; flex-direction: column; } .r19-split-decisions button { white-space: normal; } }

/* R20 version-bound DEMO review */
.r20-decision-queue{margin:16px 0;padding:16px;border:1px solid #bfd0c3;border-radius:12px;background:#f5faf6;min-width:0}.r20-decision-queue button{margin:4px;white-space:normal;max-width:100%}.r20-decision-queue p,.r20-state,.r20-notice{overflow-wrap:anywhere}.r20-decision-queue .request-card{margin-top:12px}

/* R21: real split-offer handoff, internal CEIG only. */
.r21-split-offer{margin-bottom:16px;min-width:0;overflow-wrap:anywhere}.r21-source-list{display:grid;gap:8px}.r21-source-list article{display:grid;gap:5px;padding:12px;border:1px solid #66532b;border-radius:8px;min-width:0}.r21-split-offer .system-form{min-width:0}.r21-split-offer input,.r21-split-offer textarea{box-sizing:border-box;max-width:100%;min-width:0}.r21-saved{padding:12px;border:1px solid #66532b;border-radius:8px}@media(max-width:600px){.r21-split-offer .system-form{display:flex;flex-direction:column}.r21-split-offer label{max-width:100%}.r21-split-offer button{max-width:100%;white-space:normal}}

#portal .r21-split-offer .system-form label>span,#portal .r21-source-list article>span{color:#f2e6c1}#portal .r21-split-offer .stage6-approval-check span{color:#f2e6c1}

/* R22 explicit technical matching; scoped to the existing part card. */
.r22-match{min-width:0;padding:12px;margin:12px 0;border:1px solid #66532b;border-radius:8px;overflow-wrap:anywhere}.r22-catalog{display:grid;gap:10px;margin-top:12px}.r22-catalog article{padding:12px;border:1px solid #66532b;border-radius:8px}.r22-match .system-form{min-width:0}.r22-match input,.r22-match select{box-sizing:border-box;max-width:100%;min-width:0}#portal .r22-match :is(p,small,span,li,label){color:#f2e6c1}#portal .r22-match .r22-status{font-weight:700;color:#f3c96d}@media(max-width:600px){.r22-match .system-form{display:flex;flex-direction:column}.r22-match button{max-width:100%;white-space:normal}.r22-match label{max-width:100%}}

/* R23 local reviewed document */
.r23-documents{border:1px solid #a97c25;border-radius:10px;padding:14px;margin:14px 0;min-width:0}.r23-documents p,.r23-documents strong{overflow-wrap:anywhere}.r23-documents form{display:grid;gap:12px}.r23-documents select,.r23-documents input[type=file]{max-width:100%;min-width:0}.r23-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;background:#101818;padding:12px;border-radius:6px;font:inherit}.r23-preview:empty{display:none}

#portal .r23-documents .system-form label>span{color:#f2d99a!important}.r23-documents input[type=file]{color:#f7ead0}

/* R24: document drawing, contained on desktop and narrow partner screens. */
.r24-image{margin:12px 0;min-width:0}.r24-image[hidden]{display:none}.r24-image img{display:block;max-width:100%;height:auto;background:#fff;border-radius:6px}.r24-image figcaption{margin-top:8px;overflow-wrap:anywhere;font-size:.9em}#portal .r23-documents .r24-image figcaption{color:#f2e6c1}

.r24-image-dialog{max-width:96vw;max-height:94vh;padding:12px;background:#101818;color:#f2e6c1;border:1px solid #a97c25;border-radius:10px}.r24-image-dialog::backdrop{background:rgba(0,0,0,.75)}.r24-image-dialog img{display:block;max-width:100%;max-height:78vh;height:auto;margin-top:12px;background:white}.r24-image-dialog button{color:#f2e6c1}
