/* Actions module */
.min-w-0 { min-width: 0; }

.actions-empty-card {
  min-height: 330px;
}

.actions-empty-card .card-body {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.actions-empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--as-primary-soft);
  color: var(--as-primary);
}

.actions-empty-icon svg {
  width: 26px;
  height: 26px;
}

.action-card {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.action-card:hover {
  border-color: #d6e1f5 !important;
  box-shadow: 0 6px 24px rgba(31,45,61,.07);
}

.action-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.action-provider-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--as-primary);
  background: var(--as-primary-soft);
}

.action-provider-icon svg {
  width: 21px;
  height: 21px;
}

.action-provider-icon-sm {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.action-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: .74rem;
  font-weight: 650;
}

.action-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.action-status-success {
  color: #087b3d;
  background: #e8fff3;
}

.action-status-success .action-status-dot {
  background: #19b866;
}

.action-status-warning {
  color: #846500;
  background: #fff8d8;
}

.action-status-warning .action-status-dot {
  background: #ffc700;
}

.action-workspace-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.action-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.action-chat-card {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
}

.action-chat-header {
  display: flex;
  align-items: center;
}

.action-chat-transcript {
  min-height: 500px;
  flex: 1 1 auto;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fbfcfd;
}

.action-chat-welcome {
  max-width: 720px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #3f4254;
}

.action-chat-welcome p {
  margin-top: 4px;
  color: var(--as-muted);
  line-height: 1.55;
}

.action-simpli-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--as-primary);
  color: #fff;
}

.action-simpli-avatar svg {
  width: 18px;
  height: 18px;
}

.action-chat-message {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 12px;
}

.action-chat-message.user {
  justify-content: flex-end;
}

.action-chat-message.assistant {
  justify-content: flex-start;
}

.action-message-bubble {
  width: fit-content !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: min(72%, 720px);
  display: block;
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: .93rem;
  text-align: left;

  /*
   * IMPORTANT:
   * actions.js insère déjà les vrais retours de ligne avec <br>.
   * pre-wrap conservait aussi les retours/espaces d'indentation du template
   * HTML et rendait les bulles artificiellement beaucoup trop hautes.
   */
  white-space: normal;

  word-break: break-word;
  overflow-wrap: anywhere;
}

.action-chat-message.user .action-message-bubble {
  color: #fff;
  background: var(--as-primary);
  border-radius: 16px 16px 5px 16px;
  box-shadow: none;
}

.action-chat-message.assistant .action-message-bubble {
  color: var(--as-text);
  background: #fff;
  border: 1px solid #e7ebf2;
  border-radius: 16px 16px 16px 5px;
  box-shadow: 0 2px 8px rgba(31,45,61,.035);
}

.action-composer {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--as-border);
  background: #fff;
}

.action-composer-box {
  min-height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px;
  border: 1px solid #dfe3eb;
  border-radius: 14px;
  background: #fff;
}

.action-composer-box:focus-within {
  border-color: #a8c2fb;
  box-shadow: 0 0 0 .2rem rgba(7,92,255,.06);
}

.action-attach-button,
.action-send-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.action-attach-button {
  color: #7e8299;
  background: transparent;
}

.action-attach-button:hover {
  color: var(--as-primary);
  background: var(--as-primary-soft);
}

.action-send-button {
  color: #fff;
  background: var(--as-primary);
}

.action-send-button:disabled {
  opacity: .45;
  cursor: default;
}

.action-attach-button svg,
.action-send-button svg {
  width: 18px;
  height: 18px;
}

.action-message-input {
  min-height: 38px;
  max-height: 160px;
  flex: 1 1 auto;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  padding: 8px 4px 6px;
  color: var(--as-text);
  background: transparent;
  line-height: 1.45;
}

.action-attached-files {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.action-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f3f5f8;
  color: #5e6278;
  font-size: .75rem;
  font-weight: 600;
}

.action-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-file-chip button {
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: #a1a5b7;
  background: transparent;
}

.action-file-chip svg {
  width: 14px;
  height: 14px;
}

.action-side-column {
  min-width: 0;
}

.action-connection-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.action-task-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.action-task-stats > div {
  padding: 11px;
  border-radius: 9px;
  background: #f8f9fb;
}

.action-task-stats span {
  display: block;
  color: var(--as-muted);
  font-size: .72rem;
  margin-bottom: 3px;
}

.action-task-stats strong {
  font-size: 1.2rem;
}

.action-task-checklist {
  display: grid;
  gap: 11px;
}

.action-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #5e6278;
  font-size: .82rem;
}

.action-check-icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a1a5b7;
  background: #f1f2f4;
}

.action-check-icon svg {
  width: 13px;
  height: 13px;
}

.action-check-icon.is-done {
  color: #087b3d;
  background: #e8fff3;
}

.action-type-card {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--as-border);
  border-radius: 11px;
  color: var(--as-text);
  background: #fff;
  text-align: left;
}

.action-type-card.is-selected {
  border-color: #b9cdfa;
  background: #f7faff;
}

.action-type-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--as-primary);
  background: var(--as-primary-soft);
}

.action-type-card strong,
.action-type-card small {
  display: block;
}

.action-type-card small {
  margin-top: 3px;
  color: var(--as-muted);
  line-height: 1.4;
}

.action-type-check {
  color: var(--as-primary);
}

.action-type-check svg {
  width: 18px;
  height: 18px;
}

.action-review-table th {
  width: 210px;
  color: var(--as-muted);
  font-weight: 600;
}

.actions-refresh-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  z-index: 1035;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--as-border);
  border-radius: 11px;
  color: #5e6278;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31,45,61,.10);
}

.actions-refresh-fab:hover {
  color: var(--as-primary);
  background: #fff;
  border-color: #cfdaf0;
}

.actions-refresh-fab svg {
  width: 18px;
  height: 18px;
}

/*
 * Liste des actions:
 * Bootstrap .row utilise des marges négatives pour ses gutters.
 * Quand le parent était en overflow:auto, ces quelques pixels créaient
 * la grosse scrollbar horizontale visible sous les cartes.
 */
#actionsListView {
  max-width: 100%;
  overflow-x: hidden;
}

#actionsGrid {
  max-width: 100%;
}

@media (min-width: 992px) {
  body.actions-mode #page-actions {
    display: none;
  }

  body.actions-mode #page-actions.active {
    display: flex;
    flex-direction: column;
  }

  body.actions-mode #page-actions > .page-head {
    flex: 0 0 auto;
    margin-bottom: 14px;
  }

  body.actions-mode #actionsListView {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.actions-mode #actionWorkspaceView:not(.d-none) {
    min-height: 0;
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }

  body.actions-mode .action-workspace-toolbar {
    flex: 0 0 auto;
    margin-bottom: 12px;
  }

  body.actions-mode .action-workspace-grid {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }

  body.actions-mode .action-chat-card {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  body.actions-mode .action-side-column {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  body.actions-mode .action-chat-transcript {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }

  body.actions-mode .action-composer {
    flex: 0 0 auto;
  }
}

@media (max-width: 1199.98px) {
  .action-workspace-grid {
    grid-template-columns: 1fr;
  }

  .action-side-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px;
  }

  .action-side-column .card {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 991.98px) {
  .actions-refresh-fab {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 767.98px) {
  .action-workspace-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .action-workspace-toolbar .ms-auto {
    width: 100%;
    margin-left: 0 !important;
    justify-content: space-between;
  }

  .action-chat-card {
    min-height: calc(100vh - 205px);
  }

  .action-chat-transcript {
    min-height: 420px;
    padding: 18px 14px;
  }

  .action-message-bubble {
    max-width: 88%;
  }

  .action-side-column {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   AskSimpli Actions V1.3 — Tâche en cours simplifiée
========================================================= */

.action-task-summary {
  color: var(--as-text);
  font-size: .9rem;
  line-height: 1.55;
}

.action-task-summary-title {
  margin-bottom: 8px;
  font-weight: 650;
}

.action-task-summary-text {
  margin: 0;
  color: #5e6278;
}

.action-task-progress {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--as-border);
  color: #7e8299;
  font-size: .78rem;
  line-height: 1.4;
}

.action-task-progress-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f4f8;
  color: #7e8299;
}

.action-task-progress-icon svg {
  width: 12px;
  height: 12px;
}

.action-task-progress.is-ready {
  color: #087b3d;
}

.action-task-progress.is-ready .action-task-progress-icon {
  color: #087b3d;
  background: #e8fff3;
}

.action-task-progress.is-completed {
  color: #087b3d;
}

.action-task-progress.is-completed .action-task-progress-icon {
  color: #087b3d;
  background: #e8fff3;
}

.action-task-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.action-task-actions .btn.d-none {
  display: none !important;
}

/* AskSimpli Actions V1.4 — Agent Tool Loop (aucun changement visuel majeur) */


/* =========================================================
   Actions V1.4.9.5 — Images dans « Examiner le plan »
========================================================= */

.action-review-product-images {
  padding: 16px;
  margin-top: 12px;
  border: 1px solid var(--as-border);
  border-radius: 12px;
  background: #fff;
}

.action-review-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.action-review-image-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--as-border);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.action-review-image-card:hover {
  border-color: #b9cdfa;
  text-decoration: none;
}

.action-review-image-card.is-selected {
  border-width: 2px;
  border-color: var(--as-primary);
}

.action-review-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f7f7f8;
}

.action-review-image-card span {
  display: block;
  padding: 6px 8px;
  overflow: hidden;
  font-size: 11px;
  color: var(--as-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .action-review-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   Actions V1.4.9.43 — Draft Review UI V3
========================================================= */

.as-draft-card {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #e8ebf2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(38, 51, 77, .05);
}

.as-draft-card-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid #eef0f5;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.as-draft-product-title {
  font-size: 16px;
  font-weight: 700;
  color: #242836;
}

.as-draft-code {
  margin-top: 2px;
  font-size: 12px;
  color: #8790a5;
}

.as-draft-risk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.as-draft-risk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.as-draft-risk.is-high {
  color: #875500;
  border-color: #f2d58c;
  background: #fff7dc;
}

.as-draft-risk.is-high .as-draft-risk-dot {
  background: #f2a900;
}

.as-draft-risk.is-medium {
  color: #856404;
  border-color: #ffe69c;
  background: #fff8e5;
}

.as-draft-risk.is-medium .as-draft-risk-dot {
  background: #f0b429;
}

.as-draft-risk.is-low {
  color: #216e4e;
  border-color: #b8e7d1;
  background: #edf9f3;
}

.as-draft-risk.is-low .as-draft-risk-dot {
  background: #22a06b;
}

.as-draft-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr) minmax(0, 1.25fr);
  gap: 0;
}

.as-draft-panel {
  min-width: 0;
  padding: 17px 18px;
  border-right: 1px solid #eef0f5;
}

.as-draft-panel:last-child {
  border-right: 0;
}

.as-draft-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  font-size: 12px;
  font-weight: 800;
  color: #40465a;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.as-draft-icon {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #eef3ff;
  color: #3d6bdc;
  font-size: 12px;
}

.as-draft-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.as-draft-meta div {
  min-width: 0;
}

.as-draft-meta span {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  color: #9098aa;
}

.as-draft-meta strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  color: #2e3341;
  text-overflow: ellipsis;
}

.as-draft-tags {
  margin-top: 13px;
}

.as-draft-source-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.as-draft-duplicate-line {
  margin-top: 11px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #fff8e5;
  font-size: 11px;
  color: #7a5a00;
}

.as-draft-description-body {
  max-height: 235px;
  overflow: auto;
  padding-right: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: #363b49;
}

.as-draft-description-body h2,
.as-draft-description-body h3,
.as-draft-description-body h4 {
  margin: 10px 0 6px;
  font-size: 13px;
}

.as-draft-description-body p {
  margin: 0 0 8px;
}

.as-draft-description-body ul,
.as-draft-description-body ol {
  margin: 5px 0 0;
  padding-left: 18px;
}

.as-draft-variant-head,
.as-draft-variant-row {
  display: grid;
  grid-template-columns: .85fr 1.55fr .65fr;
  gap: 8px;
  align-items: center;
}

.as-draft-variant-head {
  padding: 0 7px 6px;
  font-size: 10px;
  font-weight: 800;
  color: #9aa1b2;
  text-transform: uppercase;
}

.as-draft-variant-row {
  min-height: 38px;
  padding: 7px;
  border-top: 1px solid #f0f2f6;
  font-size: 12px;
}

.as-draft-variant-sku {
  min-width: 0;
}

.as-draft-variant-sku code {
  font-size: 11px;
  color: #d63384;
}

.as-draft-variant-price {
  font-weight: 700;
  white-space: nowrap;
}

.as-draft-proposed {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border: 1px solid #dfe3ea;
  border-radius: 5px;
  background: #f7f8fa;
  color: #7b8495;
  font-size: 9px;
  font-weight: 700;
}

.as-draft-media-strip {
  padding: 13px 18px 16px;
  border-top: 1px solid #eef0f5;
  background: #fcfdff;
}

.as-draft-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef1f6;
  color: #687084;
  font-size: 10px;
}

.as-draft-media-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.as-draft-media-thumb {
  width: 74px;
  flex: 0 0 74px;
  overflow: hidden;
  border: 1px solid #e1e5ec;
  border-radius: 9px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.as-draft-media-thumb:hover {
  border-color: #a9bff6;
  text-decoration: none;
}

.as-draft-media-thumb img {
  width: 74px;
  height: 66px;
  display: block;
  object-fit: contain;
  background: #f7f8fb;
}

.as-draft-media-thumb span {
  display: block;
  overflow: hidden;
  padding: 4px 5px;
  color: #8b93a4;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .as-draft-grid {
    grid-template-columns: 1fr 1fr;
  }

  .as-draft-variants {
    grid-column: 1 / -1;
    border-top: 1px solid #eef0f5;
  }
}

@media (max-width: 720px) {
  .as-draft-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .as-draft-grid {
    grid-template-columns: 1fr;
  }

  .as-draft-panel {
    border-right: 0;
    border-bottom: 1px solid #eef0f5;
  }
}


/* =========================================================
   Actions V1.4.9.44 — Confirmed Duplicate / Inventory Plan
========================================================= */

.as-inventory-card .as-draft-card-head {
  background: linear-gradient(180deg, #ffffff 0%, #f9fffc 100%);
}

.as-inventory-confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #aee2c8;
  border-radius: 999px;
  background: #eaf8f1;
  color: #176b49;
  font-size: 12px;
  font-weight: 800;
}

.as-inventory-confirmed-badge span {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: #22a06b;
  color: #fff;
  font-size: 10px;
}

.as-inventory-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 160px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid #eef0f5;
}

.as-inventory-existing,
.as-inventory-fit,
.as-inventory-action {
  padding: 16px 18px;
}

.as-inventory-existing,
.as-inventory-fit {
  border-right: 1px solid #eef0f5;
}

.as-existing-status {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f1f3f6;
  color: #737b8d;
  font-size: 10px;
  font-weight: 700;
}

.as-inventory-fit {
  display: grid;
  place-content: center;
  text-align: center;
  color: #687084;
  font-size: 11px;
}

.as-inventory-fit.is-fit {
  background: #f5fcf8;
  color: #176b49;
}

.as-inventory-fit.is-partial {
  background: #fffaf0;
  color: #8a6200;
}

.as-inventory-fit-number {
  margin-bottom: 2px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.as-inventory-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.as-inventory-action strong {
  font-size: 13px;
  color: #2f3543;
}

.as-inventory-action > span:last-child {
  margin-top: 3px;
  color: #81899b;
  font-size: 11px;
}

.as-inventory-table {
  padding: 8px 18px 12px;
}

.as-inventory-head,
.as-inventory-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.35fr .8fr;
  gap: 10px;
  align-items: center;
}

.as-inventory-head {
  padding: 7px 8px;
  color: #9aa1b2;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.as-inventory-row {
  min-height: 42px;
  padding: 8px;
  border-top: 1px solid #f0f2f6;
  font-size: 12px;
}

.as-inventory-row.is-match {
  background: #fff;
}

.as-inventory-row.is-missing {
  background: #fff8f8;
}

.as-fit-check {
  display: inline-grid;
  width: 17px;
  height: 17px;
  margin-right: 4px;
  place-items: center;
  border-radius: 50%;
  background: #eaf8f1;
  color: #16865a;
  font-size: 10px;
  font-weight: 800;
}

.as-inventory-row code {
  color: #3d6bdc;
  font-size: 11px;
}

.as-inventory-adjust strong {
  color: #176b49;
  font-size: 14px;
}

.as-inventory-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 13px;
  border-top: 1px solid #eef0f5;
  background: #fcfdff;
  color: #7f8798;
  font-size: 11px;
}

.as-inventory-plan-only {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3d6bdc;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.as-inventory-mobile-label {
  display: none;
}

@media (max-width: 900px) {
  .as-inventory-summary {
    grid-template-columns: 1fr;
  }

  .as-inventory-existing,
  .as-inventory-fit {
    border-right: 0;
    border-bottom: 1px solid #eef0f5;
  }

  .as-inventory-head {
    display: none;
  }

  .as-inventory-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .as-inventory-mobile-label {
    display: block;
    margin-bottom: 2px;
    color: #9aa1b2;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
  }
}


/* =========================================================
   Actions V1.4.9.45 — Inventory Quantity Mapping
========================================================= */

.as-inventory-action b {
  color: #176b49;
  font-weight: 800;
}

.as-inventory-footer strong {
  color: #176b49;
  font-weight: 800;
}

.as-inventory-row .text-muted {
  color: #a0a7b5 !important;
}


/* =========================================================
   Actions V1.4.10.2 — Real Activity Feed
========================================================= */

.action-live-activity {
  min-width: 250px;
}

.action-live-activity-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-live-logo-wrap {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.action-live-logo {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.action-live-activity-detail {
  margin-top: 4px;
  padding-left: 32px;
  font-size: 11px;
  line-height: 1.35;
  opacity: .68;
}


/* =========================================================
   AskSimpli Actions V2 — compact workspace
========================================================= */

.action-workspace-toolbar { gap: 8px; margin-bottom: 10px; }

.action-workspace-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
}

.action-chat-card,
.action-side-column .card {
  border-radius: 8px;
  box-shadow: none;
}

.action-chat-card .card-header {
  min-height: 48px;
  padding: 9px 12px;
}

.action-provider-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.action-provider-icon-sm {
  width: 30px;
  height: 30px;
}

.action-chat-transcript {
  padding: 12px 14px;
  background: #f8f9fb;
}

.action-chat-message { margin-bottom: 7px; }
.action-chat-message.assistant { padding-right: 9%; }
.action-chat-message.user { padding-left: 16%; }

.action-message-group { min-width: 0; }

.action-message-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  color: #8d95a5;
  font-size: 10px;
  font-weight: 650;
}

.action-message-mini-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.action-message-bubble {
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: .82rem;
  line-height: 1.42;
}

.action-chat-message.assistant .action-message-bubble {
  color: #303645;
  border: 1px solid #e5e9ef;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.action-chat-message.user .action-message-bubble {
  color: #294b99;
  border: 1px solid #d8e3ff;
  border-radius: 7px;
  background: #eef4ff;
}

.action-composer { padding: 8px 10px 10px; }

.action-composer-box {
  min-height: 42px;
  padding: 4px;
  border-radius: 8px;
}

.action-message-input {
  min-height: 32px;
  padding: 6px 4px 4px;
  font-size: .82rem;
}

.action-attach-button,
.action-send-button {
  width: 33px;
  height: 33px;
  border-radius: 7px;
}

.action-status {
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: .68rem;
}

.action-side-column .card-header {
  min-height: 45px;
  padding: 9px 11px;
}

.action-side-column .card-body { padding: 11px; }

.action-task-summary {
  font-size: .78rem;
  line-height: 1.45;
}

.action-task-progress {
  margin-top: 10px;
  padding-top: 10px;
  font-size: .7rem;
}

.action-task-actions { margin-top: 10px; }

.action-live-activity { min-width: 220px; }

.action-live-activity-detail {
  margin-top: 2px;
  padding-left: 29px;
  font-size: 10px;
}

.as-draft-card {
  margin-bottom: 10px;
  border-radius: 9px;
  box-shadow: none;
}

.as-draft-card-head {
  min-height: 55px;
  padding: 10px 13px;
}

.as-draft-panel { padding: 12px 13px; }
.as-draft-product-title { font-size: 14px; }

.as-draft-description-body {
  max-height: 190px;
  font-size: 12px;
}

.as-draft-risk,
.as-inventory-confirmed-badge {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
}

@media (max-width: 1199.98px) {
  .action-workspace-grid { grid-template-columns: 1fr; }
}


/* AskSimpli Actions V2.0.2 — Partial plan review */

.as-partial-plan-empty {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e9ef;
  border-radius: 8px;
  background: #f8f9fb;
}

.as-partial-plan-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #5572bd;
  background: #edf3ff;
}

.as-partial-plan-icon svg {
  width: 15px;
  height: 15px;
}


/* =========================================================
   AskSimpli Actions V2.0.4 — Familiar conversational workspace
   Assistant = direct text on workspace background
   User = compact right-side conversational bubble
   Composer = textarea + actions underneath
========================================================= */

.action-chat-card {
  background: #fff;
}

.action-chat-transcript {
  padding: 22px 26px 18px;
  background: #fff;
}

.action-chat-welcome {
  display: block;
  max-width: 820px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.action-chat-welcome .action-assistant-content {
  margin-top: 7px;
}

.action-chat-message {
  width: 100%;
  margin-bottom: 22px;
}

.action-chat-message.assistant {
  max-width: 880px;
  padding: 0;
}

.action-chat-message.user {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 0 18%;
}

.action-assistant-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  margin-bottom: 6px;
  color: #303644;
  font-size: 12px;
  font-weight: 700;
}

.action-message-mini-logo {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  object-fit: contain;
}

.action-assistant-content {
  padding-left: 26px;
  color: #20242d;
  font-size: 14px;
  line-height: 1.58;
  white-space: normal;
}

.action-user-bubble {
  max-width: min(720px, 84%);
  padding: 10px 14px;
  border: 0;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  color: #20242d;
  background: #f1f3f5;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
}

.action-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.action-message-attachments span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  color: #596174;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
}

.action-message-attachments svg {
  width: 13px;
  height: 13px;
}

/* Remove legacy bubble presentation even if an older transient row remains. */
.action-chat-message.assistant .action-message-bubble {
  padding: 0 0 0 26px;
  border: 0;
  border-radius: 0;
  color: #20242d;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.58;
}

.action-chat-message.user .action-message-bubble {
  max-width: min(720px, 84%);
  padding: 10px 14px;
  border: 0;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  color: #20242d;
  background: #f1f3f5;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.5;
}

.action-message-meta {
  display: none;
}

/* Real activity should feel like a native assistant status, not a message bubble. */
.action-thinking-row {
  margin-top: -3px;
}

.action-thinking-row .action-assistant-head {
  margin-bottom: 4px;
}

.action-live-activity {
  min-width: 0;
  margin-left: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.action-live-activity-main {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #596174;
  font-size: 12px;
  font-weight: 650;
}

.action-live-logo-wrap {
  width: 18px;
  height: 18px;
}

.action-live-logo {
  width: 16px;
  height: 16px;
}

.action-live-activity-detail {
  margin-top: 3px;
  padding-left: 25px;
  color: #9aa1af;
  font-size: 11px;
}

/* Composer */
.action-composer {
  padding: 10px 18px 16px;
  border-top: 0;
  background: #fff;
}

.action-composer-box {
  display: block;
  min-height: 0;
  padding: 10px 11px 8px;
  border: 1px solid #dfe3e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 45, 61, .055);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.action-composer-box:focus-within {
  border-color: #c9ced6;
  box-shadow: 0 3px 14px rgba(31, 45, 61, .075);
}

.action-message-input {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 180px;
  padding: 6px 7px 8px;
  border: 0;
  outline: 0;
  resize: none;
  color: #20242d;
  background: transparent;
  font-size: 14px;
  line-height: 1.48;
}

.action-message-input::placeholder {
  color: #9aa1ad;
}

.action-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  margin-top: 2px;
  padding-top: 4px;
}

.action-composer-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.action-attach-button {
  width: auto;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: #5f6675;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.action-attach-button:hover {
  color: #292f3b;
  background: #f3f4f6;
}

.action-attach-button svg {
  width: 16px;
  height: 16px;
}

.action-composer-hint {
  overflow: hidden;
  color: #a0a6b2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-send-button {
  width: auto;
  min-width: 88px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #111827;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.action-send-button:hover {
  background: #202735;
}

.action-send-button:disabled {
  opacity: .45;
}

.action-send-button svg {
  width: 15px;
  height: 15px;
}

.action-attached-files {
  max-width: 100%;
  margin: 0 0 8px;
  padding: 0 3px;
}

/* Keep the conversation readable on wide screens instead of stretching text. */
@media (min-width: 1200px) {
  .action-chat-transcript {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 767.98px) {
  .action-chat-transcript {
    padding: 16px 14px;
  }

  .action-chat-message.user {
    padding-left: 10%;
  }

  .action-user-bubble,
  .action-chat-message.user .action-message-bubble {
    max-width: 94%;
  }

  .action-assistant-content,
  .action-chat-message.assistant .action-message-bubble {
    padding-left: 0;
  }

  .action-live-activity {
    margin-left: 0;
  }

  .action-composer {
    padding: 8px 10px 12px;
  }

  .action-composer-hint {
    display: none;
  }

  .action-send-button span {
    display: none;
  }

  .action-send-button {
    min-width: 34px;
    width: 34px;
    padding: 0;
    border-radius: 50%;
  }
}


/* =========================================================
   AskSimpli Actions V2.0.5 — Rich response formatting
========================================================= */

/* Simpli identity: logo only, larger, in a rounded box */
.action-assistant-head {
  margin-bottom: 8px;
}

.action-simpli-logo-box {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e1e6ee;
  border-radius: 11px;
  background: #f7f9fc;
  box-shadow: 0 1px 3px rgba(31,45,61,.04);
}

.action-simpli-logo-box .action-message-mini-logo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
}

/* Text remains directly on the white conversation background */
.action-assistant-content {
  max-width: 850px;
  padding-left: 0;
  color: #20242d;
  font-size: 14px;
  line-height: 1.62;
}

.action-assistant-content p {
  margin: 0 0 13px;
}

.action-assistant-content p:last-child {
  margin-bottom: 0;
}

.action-assistant-content ul,
.action-assistant-content ol {
  margin: 8px 0 14px 22px;
  padding: 0;
}

.action-assistant-content li {
  margin: 0 0 7px;
  padding-left: 2px;
}

.action-assistant-content li:last-child {
  margin-bottom: 0;
}

.action-assistant-content strong {
  color: #171b24;
  font-weight: 700;
}

.action-assistant-content code {
  padding: 2px 5px;
  border: 1px solid #e6e9ee;
  border-radius: 5px;
  color: #2f3746;
  background: #f5f6f8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .88em;
}

/* The activity state uses the same Simpli visual language. */
.action-thinking-row .action-assistant-head {
  margin-bottom: 5px;
}

.action-thinking-row .action-simpli-logo-box {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 9px;
}

.action-thinking-row .action-simpli-logo-box .action-message-mini-logo {
  width: 25px;
  height: 25px;
}

/* User messages remain familiar, restrained bubbles. */
.action-user-bubble {
  max-width: min(700px, 82%);
  padding: 10px 14px;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  background: #f0f2f4;
}

/* Comfortable rhythm between turns. */
.action-chat-message {
  margin-bottom: 25px;
}

@media (max-width: 767.98px) {
  .action-simpli-logo-box {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }

  .action-simpli-logo-box .action-message-mini-logo {
    width: 27px;
    height: 27px;
  }

  .action-assistant-content {
    font-size: 13.5px;
    line-height: 1.58;
  }
}


/* =========================================================
   AskSimpli Actions V2.0.6 — Simpli logo spacing
========================================================= */

/* Keep the logo beside the response, but give the text more breathing room. */
.action-chat-message.assistant {
  column-gap: 14px;
}

/* Slightly smaller rounded logo container. */
.action-simpli-logo-box {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin-right: 12px;
  border-radius: 10px;
}

/* Logo itself reduced by ~30% from V2.0.5 (30px -> 21px). */
.action-simpli-logo-box .action-message-mini-logo {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

/* Keep text away from the logo even if older flex rules are still active. */
.action-assistant-content {
  padding-left: 0;
}

/* Activity / thinking state follows the same proportions. */
.action-thinking-row .action-simpli-logo-box {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  margin-right: 10px;
  border-radius: 9px;
}

.action-thinking-row .action-simpli-logo-box .action-message-mini-logo {
  width: 19px;
  height: 19px;
}

@media (max-width: 767.98px) {
  .action-simpli-logo-box {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    margin-right: 10px;
  }

  .action-simpli-logo-box .action-message-mini-logo {
    width: 20px;
    height: 20px;
  }
}


/* =========================================================
   AskSimpli Actions V2.0.9 — Vertical Simpli response layout
========================================================= */

/* Every Simpli turn is vertical: logo first, then content underneath. */
.action-chat-message.assistant,
.action-chat-welcome,
.action-thinking-row {
  display: block !important;
}

.action-chat-message.assistant .action-assistant-head,
.action-chat-welcome .action-assistant-head,
.action-thinking-row .action-assistant-head {
  display: block;
  width: 100%;
  margin: 0 0 10px 0;
}

.action-chat-message.assistant .action-simpli-logo-box,
.action-chat-welcome .action-simpli-logo-box,
.action-thinking-row .action-simpli-logo-box {
  display: inline-grid;
  margin-right: 0;
}

/* Response text starts directly under the logo. */
.action-chat-message.assistant .action-assistant-content,
.action-chat-welcome .action-assistant-content {
  display: block;
  width: 100%;
  max-width: 850px;
  margin: 0;
  padding: 0;
  color: #20242d;
  font-size: 14px;
  line-height: 1.62;
  font-family: inherit;
}

/* Work-in-progress state uses the exact same reading style as a Simpli answer. */
.action-thinking-row .action-live-activity {
  display: block;
  width: 100%;
  max-width: 850px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #20242d;
  font-family: inherit;
}

.action-thinking-row .action-live-activity-main {
  display: block;
  margin: 0;
  color: #20242d;
  font-size: 14px;
  line-height: 1.62;
  font-family: inherit;
  font-weight: 400;
}

.action-thinking-row .action-live-activity-main strong {
  color: #20242d;
  font-size: 14px;
  line-height: 1.62;
  font-family: inherit;
  font-weight: 600;
}

.action-thinking-row .action-live-activity-detail {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  color: #7b8392;
  font-size: 14px;
  line-height: 1.62;
  font-family: inherit;
  font-weight: 400;
}

/* The old secondary activity logo is no longer used. */
.action-live-logo-wrap,
.action-live-logo {
  display: none !important;
}

@media (max-width: 767.98px) {
  .action-chat-message.assistant .action-assistant-content,
  .action-chat-welcome .action-assistant-content,
  .action-thinking-row .action-live-activity-main,
  .action-thinking-row .action-live-activity-detail {
    font-size: 13.5px;
    line-height: 1.58;
  }
}


/* =========================================================
   AskSimpli Actions V2.0.44 — Borderless chat UI correction
   Base: user's last known-good CSS
========================================================= */

/* Workspace itself: no giant card around the conversation. */
#actionWorkspaceView {
  min-height: 0;
  flex: 1 1 auto;
}

.action-workspace-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
}

/* The left side is now a plain modern conversation canvas. */
.action-chat-shell {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.action-chat-topbar {
  flex: 0 0 auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 8px 8px;
  background: transparent;
}

.action-chat-topbar #actionResetButton {
  border: 0;
  background: transparent;
  color: #697386;
  box-shadow: none;
}

.action-chat-topbar #actionResetButton:hover {
  color: #252b36;
  background: #f2f4f7;
}

/* Conversation canvas */
body.actions-mode .action-chat-transcript,
.action-chat-shell .action-chat-transcript {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 18px 28px 22px !important;
  background: transparent !important;
  border: 0 !important;
  overscroll-behavior: contain;
}

/* One turn = clean spacing, no accidental legacy flex constraints. */
.action-chat-shell .action-chat-message {
  width: 100% !important;
  margin: 0 0 24px !important;
}

.action-chat-shell .action-chat-message.assistant,
.action-chat-shell .action-thinking-row,
.action-chat-shell .action-chat-welcome {
  display: block !important;
  max-width: 900px !important;
  padding: 0 !important;
}

.action-chat-shell .action-chat-message.user {
  display: flex !important;
  justify-content: flex-end !important;
  padding: 0 !important;
}

/* Simpli logo: explicit white container as requested. */
.action-chat-shell .action-simpli-logo-box {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
  border: 1px solid #e3e7ed !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(31,45,61,.05) !important;
}

.action-chat-shell .action-simpli-logo-box .action-message-mini-logo {
  width: 21px !important;
  height: 21px !important;
  display: block !important;
  object-fit: contain !important;
}

.action-chat-shell .action-assistant-head {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 9px !important;
}

/* Assistant response = text directly on page, never a bubble. */
.action-chat-shell .action-assistant-content,
.action-chat-shell .action-chat-message.assistant .action-message-bubble {
  display: block !important;
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #20242d !important;
  font-size: 14px !important;
  line-height: 1.62 !important;
  white-space: normal !important;
}

/* USER BUBBLE — restore the clear modern light-gray bubble. */
.action-chat-shell .action-user-bubble,
.action-chat-shell .action-chat-message.user .action-message-bubble {
  display: block !important;
  width: auto !important;
  max-width: min(700px, 78%) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 18px !important;
  border-bottom-right-radius: 6px !important;
  color: #20242d !important;
  background: #eef0f2 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

/* Attachments stay contained inside the user bubble / response. */
.action-chat-shell .action-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

/* Composer — force the intended two-level layout:
   textarea on top, toolbar underneath. */
body.actions-mode .action-composer,
.action-chat-shell .action-composer {
  flex: 0 0 auto !important;
  padding: 8px 12px 14px !important;
  border: 0 !important;
  background: transparent !important;
}

.action-chat-shell .action-composer-box {
  width: 100% !important;
  min-height: 0 !important;
  display: block !important;
  padding: 10px 12px 8px !important;
  border: 1px solid #dfe3e8 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 10px rgba(31,45,61,.055) !important;
}

.action-chat-shell .action-composer-box:focus-within {
  border-color: #c8ced8 !important;
  box-shadow: 0 3px 14px rgba(31,45,61,.075) !important;
}

.action-chat-shell .action-message-input {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  min-height: 52px !important;
  max-height: 180px !important;
  margin: 0 !important;
  padding: 7px 7px 10px !important;
  border: 0 !important;
  outline: 0 !important;
  resize: none !important;
  overflow-y: auto !important;
  color: #20242d !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.48 !important;
  box-shadow: none !important;
}

.action-chat-shell .action-message-input::placeholder {
  color: #9aa1ad !important;
}

/* Critical fix: toolbar must remain BELOW the textarea, never beside/over it. */
.action-chat-shell .action-composer-toolbar {
  width: 100% !important;
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 4px 0 0 !important;
}

.action-chat-shell .action-composer-tools {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.action-chat-shell .action-attach-button {
  width: auto !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #5f6675 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.action-chat-shell .action-attach-button:hover {
  color: #292f3b !important;
  background: #f3f4f6 !important;
}

.action-chat-shell .action-composer-hint {
  overflow: hidden !important;
  color: #a0a6b2 !important;
  font-size: 10px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.action-chat-shell .action-send-button {
  width: auto !important;
  min-width: 96px !important;
  height: 36px !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 13px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #fff !important;
  background: #111827 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.action-chat-shell .action-send-button:hover {
  background: #202735 !important;
}

.action-chat-shell .action-send-button:disabled {
  opacity: .45 !important;
}

/* Activity state uses the same Simpli layout. */
.action-chat-shell .action-thinking-row .action-live-activity {
  display: block !important;
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.action-chat-shell .action-thinking-row .action-live-activity-main,
.action-chat-shell .action-thinking-row .action-live-activity-detail {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.62 !important;
}

.action-chat-shell .action-thinking-row .action-live-activity-detail {
  margin-top: 4px !important;
  color: #7b8392 !important;
}

/* Right sidebar */
.action-side-column {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 2px;
}

.action-side-column .card {
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  box-shadow: none;
}

.action-connection-status-row {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f3;
}

.action-back-to-actions {
  margin-top: 12px;
  border: 1px solid #e5e8ec;
  background: #fff;
  color: #4f5868;
}

.action-back-to-actions:hover {
  background: #f7f8fa;
  color: #1f2937;
}

/* Desktop action mode fills the available content height cleanly. */
@media (min-width: 992px) {
  body.actions-mode #actionWorkspaceView:not(.d-none) {
    min-height: 0;
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }

  body.actions-mode #actionWorkspaceView:not(.d-none) > .action-workspace-grid {
    min-height: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 1199.98px) {
  .action-workspace-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .action-chat-shell {
    min-height: 620px;
  }

  .action-side-column {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 767.98px) {
  .action-chat-shell .action-chat-transcript {
    padding: 14px 10px 18px !important;
  }

  .action-chat-shell .action-user-bubble,
  .action-chat-shell .action-chat-message.user .action-message-bubble {
    max-width: 92% !important;
  }

  .action-chat-shell .action-composer {
    padding: 8px 4px 10px !important;
  }

  .action-chat-shell .action-composer-hint {
    display: none !important;
  }

  .action-chat-shell .action-send-button {
    min-width: 36px !important;
    width: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  .action-chat-shell .action-send-button span {
    display: none !important;
  }
}

/* =========================================================
   AskSimpli Actions V2.3.0 — Multi-conversation workspace
========================================================= */

.action-discussions-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-discussion-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  border-radius: 7px;
  transition: background .12s ease;
}

.action-discussion-row:hover {
  background: #f5f7fa;
}

.action-discussion-row.is-active {
  background: #eef3ff;
}

.action-discussion-main {
  min-width: 0;
  min-height: 34px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3f4254;
  font-size: .78rem;
  text-align: left;
}

.action-discussion-row.is-active .action-discussion-main {
  color: #075cff;
  font-weight: 650;
}

.action-discussion-main svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.action-discussion-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-discussion-task-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #075cff;
}

.action-discussion-delete {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-right: 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a1a5b7;
  opacity: 0;
  transition: opacity .12s ease, color .12s ease, background .12s ease;
}

.action-discussion-row:hover .action-discussion-delete,
.action-discussion-row.is-active .action-discussion-delete {
  opacity: 1;
}

.action-discussion-delete:hover {
  color: #d9214e;
  background: #fff0f3;
}

.action-discussion-delete svg,
.action-discussion-add svg,
#actionDiscussionsMoreButton svg {
  width: 14px;
  height: 14px;
}

.action-discussion-add {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
}

.action-discussions-dropdown {
  max-height: 340px;
  overflow-y: auto;
  padding: 5px;
}

.action-discussions-dropdown .action-discussion-row {
  width: 100%;
}

.action-discussions-dropdown .action-discussion-delete {
  opacity: 1;
}

#actionDiscussionsMoreButton {
  min-height: 31px;
  padding: 5px 8px;
  font-size: .75rem;
  color: #7e8299;
}

@media (max-width: 991.98px) {
  .action-discussion-delete {
    opacity: 1;
  }
}


/* Automatisations V2.5 */
.asauto-row{border-bottom:1px solid #eef0f3;padding:10px 0;display:flex;gap:8px;justify-content:space-between;align-items:flex-start}.asauto-row:last-child{border:0}.asauto-row strong{font-size:12px}.asauto-row .text-muted{font-size:11px}.asauto-buttons{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.asauto-buttons .btn{font-size:10px;padding:4px 6px}.asauto-history{border-bottom:1px solid #eef0f3;padding:12px 0}
