/* =========================================================
   TASK GENERATOR MOBILE RESET / CLEAN BREAK
   ========================================================= */

.task-modal-shell,
.task-modal-shell * {
  box-sizing: border-box;
}

.task-modal-shell {
  width: 100%;
  max-width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  background: #f6f7f8;
}

.task-modal-panel {
  width: 100%;
  max-width: 100%;
  padding: 1rem !important;
  margin: 0 auto !important;
}

/* Main layout */
.task-editor-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

/* Cards */
.task-modal-shell .cpc-card {
  border-radius: 18px;
  border: 1px solid rgba(0, 56, 73, 0.12);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.task-modal-shell .cpc-card__header {
  padding: 0.85rem 1rem !important;
  min-height: auto !important;
  border-bottom: 1px solid rgba(0, 56, 73, 0.10);
}

.task-modal-shell .cpc-card__body {
  padding: 1rem !important;
}

/* Inputs */
.task-modal-shell .form-group,
.task-modal-shell .shiny-input-container {
  width: 100% !important;
  margin-bottom: 0.75rem !important;
}

.task-modal-shell label {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #003849;
}

.task-modal-shell .selectize-input,
.task-modal-shell .form-control,
.task-modal-shell select,
.task-modal-shell textarea {
  min-height: 42px;
  border-radius: 12px !important;
  font-size: 0.92rem;
}

/* Header */
.task-modal-shell .cpc-page-head {
  margin-bottom: 1rem !important;
}

.task-modal-shell .title-block h2 {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.1;
}

/* Buttons */
.task-modal-shell .cpc-btn,
.task-modal-shell .praxis-review-btn,
.task-modal-shell .btn {
  min-height: 40px;
  border-radius: 999px !important;
  padding: 0.45rem 0.85rem !important;
  white-space: nowrap;
}

/* Steps area */
.task-steps-card {
  min-width: 0;
}

.task-steps-wrap {
  padding: 1rem !important;
  max-width: 100%;
  overflow-x: hidden;
}

/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 992px) {
  .task-modal-panel {
    padding: 0.75rem !important;
  }

  .task-editor-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .task-meta-card {
    order: 1;
  }

  .task-steps-card {
    order: 2;
  }

  .task-modal-shell .cpc-card__header {
    align-items: flex-start !important;
    gap: 0.65rem;
  }
}

/* =========================================================
   PHONE
   ========================================================= */

@media (max-width: 576px) {
  .modal-dialog.modal-xl,
  .modal-dialog.modal-lg,
  .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .modal-content {
    min-height: 100vh;
    border-radius: 0 !important;
  }

  .task-modal-panel {
    padding: 0.5rem !important;
  }

  .task-modal-shell .cpc-page-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f6f7f8;
    padding: 0.5rem 0 0.65rem;
  }

  .task-modal-shell .cpc-page-head .d-flex {
    flex-direction: column;
    align-items: stretch !important;
  }

  .task-modal-shell .title-block h2 {
    font-size: 1.25rem;
  }

  .task-modal-shell #save_task_top,
  .task-modal-shell .cpc-page-head .cpc-btn {
    width: 100%;
    justify-content: center;
  }

  .task-modal-shell .cpc-card {
    border-radius: 16px;
  }

  .task-modal-shell .cpc-card__header {
    padding: 0.75rem !important;
    flex-direction: column;
    align-items: stretch !important;
  }

  .task-modal-shell .cpc-card__body {
    padding: 0.75rem !important;
  }

  .task-modal-shell .row.g-3 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.35rem;
  }

  .task-modal-shell .col-md-6,
  .task-modal-shell .col-12 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .task-modal-shell .cpc-steps-header > div:last-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.5rem !important;
  }

  .task-modal-shell .cpc-steps-header .cpc-btn,
  .task-modal-shell .cpc-steps-header .praxis-review-btn,
  .task-modal-shell .cpc-steps-header .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.45rem 0.55rem !important;
  }

  .task-modal-shell .praxis-review-btn {
    grid-column: span 2;
  }

  .task-steps-wrap {
    padding: 0.65rem !important;
  }
}

/* =========================================================
   TASK GENERATOR + PRAXIS DRAWER COEXISTENCE
   ========================================================= */

/* Give the task page breathing room when Praxis is open */
body:has(.dki-praxis-shell.praxis-is-open) .task-modal-panel,
body:has(.dki-praxis-shell.praxis-is-expanded) .task-modal-panel {
  max-width: calc(100vw - 560px);
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* When drawer is open, stop forcing two columns */
body:has(.dki-praxis-shell.praxis-is-open) .task-editor-grid,
body:has(.dki-praxis-shell.praxis-is-expanded) .task-editor-grid {
  grid-template-columns: 1fr !important;
}

/* Make cards full width and readable */
body:has(.dki-praxis-shell.praxis-is-open) .task-meta-card,
body:has(.dki-praxis-shell.praxis-is-open) .task-steps-card {
  width: 100%;
  max-width: 100%;
}

/* Keep the step controls from getting clipped */
body:has(.dki-praxis-shell.praxis-is-open) .cpc-steps-header {
  align-items: flex-start !important;
}

body:has(.dki-praxis-shell.praxis-is-open) .cpc-steps-header > div:last-child {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 0.5rem !important;
}

body:has(.dki-praxis-shell.praxis-is-open) .cpc-steps-header .cpc-btn,
body:has(.dki-praxis-shell.praxis-is-open) .cpc-steps-header .praxis-review-btn,
body:has(.dki-praxis-shell.praxis-is-open) .cpc-steps-header .btn {
  width: 100%;
  justify-content: center;
}

/* On medium screens, treat Praxis like a mobile overlay */
@media (max-width: 1400px) {
  body:has(.dki-praxis-shell.praxis-is-open) .task-modal-panel,
  body:has(.dki-praxis-shell.praxis-is-expanded) .task-modal-panel {
    max-width: 100% !important;
    padding-right: 0.75rem !important;
  }

  body:has(.dki-praxis-shell.praxis-is-open) .task-editor-grid,
  body:has(.dki-praxis-shell.praxis-is-expanded) .task-editor-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Phone: Praxis should sit over the page, not squeeze it */
@media (max-width: 768px) {
  body:has(.dki-praxis-shell.praxis-is-open) .task-modal-panel,
  body:has(.dki-praxis-shell.praxis-is-expanded) .task-modal-panel {
    max-width: 100% !important;
    padding: 0.5rem !important;
  }

  body:has(.dki-praxis-shell.praxis-is-open) .cpc-steps-header > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:has(.dki-praxis-shell.praxis-is-open) .praxis-review-btn {
    grid-column: span 2;
  }
}
body:has(.dki-praxis-shell.praxis-is-open) .dki-praxis-sticky-container,
body:has(.dki-praxis-shell.praxis-is-expanded) .dki-praxis-sticky-container {
  display: none !important;
}

/* =========================================================
   COLLAPSED META = COMPACT TOP BAR
   ========================================================= */

.task-modal-shell .task-meta-card:has(.collapse:not(.show)) {
  grid-column: 1 / -1;
}

.task-modal-shell .task-meta-card:has(.collapse:not(.show)) .cpc-card__header {
  padding: 0.7rem 1rem !important;
  flex-direction: row !important;
  align-items: center !important;
}

.task-modal-shell .task-meta-card:has(.collapse:not(.show)) + .task-steps-card {
  grid-column: 1 / -1;
}

/* =========================================================
   CLEANER STEP CARDS
   ========================================================= */

.task-modal-shell .task-step-card,
.task-modal-shell .step-card,
.task-modal-shell .cpc-step-card {
  position: relative;
  border-radius: 18px !important;
  border: 1px solid rgba(0, 56, 73, 0.10) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.045) !important;
  padding-left: 1.15rem !important;
  overflow: hidden;
}

.task-modal-shell .task-step-card::before,
.task-modal-shell .step-card::before,
.task-modal-shell .cpc-step-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c9282d 0%, #111 100%);
}

.task-modal-shell .task-step-card h3,
.task-modal-shell .task-step-card h4,
.task-modal-shell .step-card h3,
.task-modal-shell .step-card h4,
.task-modal-shell .cpc-step-card h3,
.task-modal-shell .cpc-step-card h4 {
  font-size: 1.05rem !important;
  letter-spacing: 0.01em;
  color: #003849;
  margin-bottom: 0.7rem !important;
}

.task-modal-shell .task-step-card textarea,
.task-modal-shell .step-card textarea,
.task-modal-shell .cpc-step-card textarea {
  font-size: 0.98rem !important;
  line-height: 1.45 !important;
  min-height: 120px;
}

/* =========================================================
   TASK STEP ROWS — RED/BLACK DETAIL, SMALLER FONT
   ========================================================= */

.task-modal-shell .dki-step-row {
  position: relative;
  margin-bottom: 1rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid rgba(0, 56, 73, 0.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.045);
  overflow: hidden;
}

.task-modal-shell .dki-step-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c9282d 0%, #111 100%);
}

.task-modal-shell .dki-step-toolbar {
  margin-bottom: 0.65rem !important;
}

.task-modal-shell .dki-step-toolbar .control-label {
  font-size: 1rem !important;
  font-weight: 800;
  color: #003849;
  margin: 0 !important;
}

.task-modal-shell .dki-step-row textarea {
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  min-height: 112px;
  border-radius: 14px !important;
  resize: vertical;
}

.task-modal-shell .praxis-step-btn {
  min-height: 38px;
  padding: 0.4rem 0.8rem !important;
  font-size: 0.86rem;
}

/* Mobile */
@media (max-width: 576px) {
  .task-modal-shell .dki-step-row {
    padding: 0.85rem 0.75rem 0.85rem 1rem;
  }

  .task-modal-shell .dki-step-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
  }

  .task-modal-shell .praxis-step-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   STEP TEXT WRAPPING / BETTER CARD FLOW
   ========================================================= */

.task-modal-shell .dki-step-row {
  max-width: 100%;
}

.task-modal-shell .dki-step-row .form-group,
.task-modal-shell .dki-step-row .shiny-input-container {
  width: 100% !important;
  margin-bottom: 0 !important;
}

.task-modal-shell .dki-step-row textarea {
  width: 100% !important;
  min-height: 92px !important;
  height: auto !important;
  padding: 0.9rem 1rem !important;

  font-size: 0.92rem !important;
  line-height: 1.55 !important;

  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;

  border: 1px solid rgba(0, 56, 73, 0.14) !important;
  background: #fbfcfd !important;
}

/* less huge empty boxes for short steps */
.task-modal-shell .dki-step-row textarea:not(:focus) {
  min-height: 82px !important;
}

/* nicer spacing between step title/button and text */
.task-modal-shell .dki-step-toolbar {
  padding-right: 0.25rem;
  margin-bottom: 0.5rem !important;
}

/* phone: stack label + button cleanly */
@media (max-width: 576px) {
  .task-modal-shell .dki-step-row textarea {
    font-size: 0.9rem !important;
    min-height: 88px !important;
  }
}

/* =========================================================
   REQUIREMENTS SELECTIZE — FULL WIDTH
   ========================================================= */

/* Materials */
.task-modal-shell .shiny-input-container:has(#tasks-materials_required_select),
.task-modal-shell .shiny-input-container:has([id*="materials_required_select"]) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* Equipment */
.task-modal-shell .shiny-input-container:has(#tasks-equipment_required_select),
.task-modal-shell .shiny-input-container:has([id*="equipment_required_select"]) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* Safety */
.task-modal-shell .shiny-input-container:has(#tasks-safety_concerns),
.task-modal-shell .shiny-input-container:has([id*="safety_concerns"]) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* PPE */
.task-modal-shell .shiny-input-container:has(#tasks-ppe_required),
.task-modal-shell .shiny-input-container:has([id*="ppe_required"]) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* Make selectize feel more modern */
.task-modal-shell .selectize-control.multi .selectize-input {
  padding: 0.5rem !important;
  min-height: 52px !important;
  border-radius: 16px !important;
}

/* Better tag chips */
.task-modal-shell .selectize-control.multi .selectize-input > div {
  border-radius: 10px !important;
  padding: 0.35rem 0.55rem !important;
  background: rgba(0, 56, 73, 0.08) !important;
  color: #003849 !important;
  border: 1px solid rgba(0, 56, 73, 0.08);
}

/* Allow long values to wrap */
.task-modal-shell .selectize-control.multi .selectize-input > div {
  white-space: normal !important;
  max-width: 100%;
}

.praxis-activity-feed {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 56, 73, 0.06);
  border: 1px solid rgba(0, 56, 73, 0.10);
  font-size: 0.82rem;
  color: #003849;
}

.praxis-activity-title {
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.praxis-activity-line {
  line-height: 1.35;
  opacity: 0.9;
}

.praxis-activity-line.active {
  font-weight: 600;
}

.praxis-spinner-dot {
  display: inline-block;
  animation: praxisPulse 1.2s infinite ease-in-out;
}

@keyframes praxisPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.dki-praxis-panel-header {
  background: linear-gradient(90deg, #003849, #005569);
  border-bottom: none;
}

.dki-praxis-title {
  color: #ffffff;
}

.dki-praxis-panel-header .text-muted {
  color: rgba(255,255,255,0.78) !important;
}

.dki-praxis-expand,
.dki-praxis-close {
  color: rgba(255,255,255,0.85) !important;
}

.praxis-activity-feed {
  margin: 10px 18px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 56, 73, 0.06);
  border: 1px solid rgba(0, 56, 73, 0.12);
  color: #003849;
  font-size: 0.82rem;
}

.praxis-activity-title {
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.praxis-activity-line {
  line-height: 1.35;
  opacity: 0.92;
}

.praxis-activity-line.active {
  font-weight: 700;
}

.praxis-spinner-dot {
  display: inline-block;
  animation: praxisPulse 1.1s infinite ease-in-out;
}

@keyframes praxisPulse {
  0%, 100% { opacity: 0.35; transform: rotate(0deg); }
  50% { opacity: 1; transform: rotate(18deg); }
}

.praxis-source-stack {
  margin-top: .75rem;
  display: grid;
  gap: .5rem;
}

.praxis-source-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: .65rem;
  padding: .65rem;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.praxis-source-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eef6ff;
  font-size: 1.25rem;
}

.praxis-source-title {
  font-weight: 700;
  font-size: .9rem;
}

.praxis-source-meta {
  font-size: .75rem;
  color: #6c757d;
}

.praxis-source-quote {
  margin: .35rem 0 0;
  padding-left: .6rem;
  border-left: 3px solid #2f8cff;
  font-size: .8rem;
  color: #333;
}

.praxis-source-panel {
  padding: .75rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.praxis-source-panel-title {
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.praxis-source-link {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: .5rem;
  padding: .55rem;
  margin-bottom: .5rem;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  border: 1px solid #e5e7eb;
}

.praxis-source-name {
  font-weight: 700;
  font-size: .85rem;
}

.praxis-source-path,
.praxis-source-quote {
  font-size: .72rem;
  color: #6b7280;
}

.praxis-sources-rail {
  position: fixed;
  right: 560px;
  bottom: 90px;
  width: 360px;
  max-height: 520px;
  overflow-y: auto;
  z-index: 9998;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  padding: 14px;
}

.praxis-sources-rail-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.praxis-sources-rail-link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  background: #f9fafb;
}

.praxis-sources-rail {
  position: fixed;
  right: 560px;
  bottom: 90px;
  width: 360px;
  max-height: 520px;
  overflow-y: auto;
  z-index: 9998;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  padding: 14px;
}

.praxis-sources-rail-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.praxis-sources-rail-link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  background: #f9fafb;
}

.praxis-chat-sources-compact {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid #e5e7eb;
}

.praxis-chat-sources-title {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: .35rem;
}

.praxis-chat-source-pill {
  display: block;
  max-width: 100%;
  padding: .35rem .5rem;
  margin-bottom: .3rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-editor-current-name {
  font-size: 0.9rem;
  line-height: 1.25;
  max-width: 720px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta-current-name {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.8;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   PRAXIS INLINE STEP REVIEW BUTTON
   ========================================================= */

.task-modal-shell .praxis-step-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  min-height: 38px;
  padding: 0.35rem 0.75rem !important;

  border-radius: 999px !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;

  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(124, 58, 237, 0.10)),
    #ffffff !important;

  color: #0f3f8f !important;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;

  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.task-modal-shell .praxis-step-btn:hover,
.task-modal-shell .praxis-step-btn:focus {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.55) !important;

  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(124, 58, 237, 0.16)),
    #ffffff !important;

  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
  color: #123f8c !important;
}

.task-modal-shell .praxis-step-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.14);
}

.task-modal-shell .praxis-step-icon {
  width: 21px;
  height: 21px;
  object-fit: contain;
  display: inline-block;
  flex: 0 0 auto;
}

.task-modal-shell .praxis-step-label {
  line-height: 1;
  white-space: nowrap;
}

.task-modal-shell .praxis-step-icon {
  width: 26px;
  height: 26px;
}

/* =========================================================
   DKI / PRAXIS REVIEW ALL BUTTON
   Enterprise DKI treatment with PRAXIS accent
   ========================================================= */

.task-modal-shell .praxis-review-all-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  min-height: 42px;
  padding: 0.42rem 1rem 0.42rem 0.72rem !important;

  border-radius: 999px !important;
  border: 1px solid rgba(201, 40, 45, 0.28) !important;

  background:
    linear-gradient(135deg,
      #ffffff 0%,
      #ffffff 48%,
      rgba(201, 40, 45, 0.055) 100%
    ) !important;

  color: #111827 !important;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.01em;

  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.075),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75);

  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.task-modal-shell .praxis-review-all-btn:hover,
.task-modal-shell .praxis-review-all-btn:focus {
  transform: translateY(-1px);

  border-color: rgba(201, 40, 45, 0.48) !important;

  background:
    linear-gradient(135deg,
      #ffffff 0%,
      #fff7f7 46%,
      rgba(201, 40, 45, 0.115) 100%
    ) !important;

  color: #003849 !important;

  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.11),
    0 0 0 3px rgba(201, 40, 45, 0.06);
}

.task-modal-shell .praxis-review-all-btn:active {
  transform: translateY(0);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.09),
    inset 0 2px 5px rgba(0, 0, 0, 0.06);
}

.task-modal-shell .praxis-review-all-text {
  line-height: 1;
  white-space: nowrap;
}

/* PRAXIS mark badge — hides PNG square and matches DKI styling */
.task-modal-shell .praxis-dki-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  border-radius: 999px;
  overflow: hidden;

  background:
    linear-gradient(135deg,
      #ffffff 0%,
      #f8fafc 34%,
      rgba(0, 56, 73, 0.10) 63%,
      rgba(201, 40, 45, 0.22) 100%
    );

  box-shadow:
    inset 0 0 0 1px rgba(0, 56, 73, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.10);
}

.task-modal-shell .praxis-dki-badge--all {
  width: 32px;
  height: 32px;
}

.task-modal-shell .praxis-dki-badge-img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
  border-radius: 999px;
}

/* =========================================================
   DKI / PRAXIS INLINE REVIEW STEP BUTTON
   ========================================================= */

.task-modal-shell .praxis-step-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  min-height: 38px;
  padding: 0.35rem 0.85rem 0.35rem 0.58rem !important;

  border-radius: 999px !important;
  border: 1px solid rgba(0, 56, 73, 0.16) !important;

  background:
    linear-gradient(135deg,
      #ffffff 0%,
      #ffffff 52%,
      rgba(0, 56, 73, 0.055) 100%
    ) !important;

  color: #003849 !important;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.005em;

  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.065);

  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.task-modal-shell .praxis-step-btn:hover,
.task-modal-shell .praxis-step-btn:focus {
  transform: translateY(-1px);
  border-color: rgba(201, 40, 45, 0.38) !important;

  background:
    linear-gradient(135deg,
      #ffffff 0%,
      #fffafa 50%,
      rgba(201, 40, 45, 0.08) 100%
    ) !important;

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.095);
}

.task-modal-shell .praxis-dki-badge--step {
  width: 28px;
  height: 28px;
}

.task-modal-shell .praxis-step-label {
  line-height: 1;
  white-space: nowrap;
}

.task-modal-shell .praxis-step-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;

  line-height: 1 !important;
}

.task-modal-shell .praxis-step-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  line-height: 1 !important;
  height: 100%;

  position: relative;
  top: -1px; /* tiny optical correction */
}

.task-modal-shell .praxis-step-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;

  height: 42px !important;
  min-height: 42px !important;
  padding: 0 0.9rem 0 0.55rem !important;

  line-height: 1 !important;
}

.task-modal-shell .praxis-step-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: 42px !important;
  line-height: 42px !important;

  margin: 0 !important;
  padding: 0 !important;

  position: relative;
  top: 0;
}

.task-modal-shell .praxis-dki-badge {
  width: 30px;
  height: 30px;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  flex: 0 0 30px;
  line-height: 1 !important;
  margin: 0 !important;
}

.task-modal-shell .praxis-dki-badge-img {
  display: block !important;
  width: 86%;
  height: 86%;
  object-fit: contain;
  line-height: 1 !important;
}

/* =========================================================
   FINAL PRAXIS IMAGE CLAMP
   Must stay at bottom of CSS bundle
   ========================================================= */

.task-modal-shell .praxis-review-all-btn,
.task-modal-shell .praxis-step-btn {
  overflow: hidden !important;
}

.task-modal-shell .praxis-dki-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.task-modal-shell .praxis-dki-badge--all {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  flex: 0 0 30px !important;
}

.task-modal-shell .praxis-dki-badge--step {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  flex: 0 0 28px !important;
}

.task-modal-shell .praxis-dki-badge > img.praxis-dki-badge-img,
.task-modal-shell button.praxis-review-all-btn img.praxis-dki-badge-img,
.task-modal-shell button.praxis-step-btn img.praxis-dki-badge-img {
  display: block !important;

  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;

  object-fit: contain !important;
  object-position: center center !important;

  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  line-height: 1 !important;
}