.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emergency-check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  color: #7c201c;
}

.form-grid .emergency-check input[type="checkbox"] {
  width: 18px;
  margin: 0;
  accent-color: #e21e15;
}

.detail-emergency-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #8c211d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.detail-emergency-row {
  margin: 14px 0 -2px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.detail-emergency-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #e21e15;
}

.review-risk-button {
  border: 0;
  border-radius: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0b80e8, #0868cd);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 5px #0b5ea933;
}

.at-risk-review {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows .26s ease, margin .26s ease, opacity .2s ease;
}

.at-risk-review.is-open {
  grid-template-rows: 1fr;
  margin: 0 0 20px;
  opacity: 1;
}

.risk-content {
  min-height: 0;
  overflow: hidden;
  padding: 22px 24px 18px;
  border: 1px solid #d8e6f2;
  border-radius: 10px;
  background: linear-gradient(115deg, #f4faff, #fff);
  box-shadow: 0 3px 10px #17385a0b;
}

.risk-heading, .risk-card-top, .risk-heading-actions, .risk-meta {
  display: flex;
  align-items: center;
}

.risk-heading { gap: 16px; }
.risk-heading-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: #e5f2ff;
  color: #0877df;
  font-size: 34px;
}
.risk-heading h2 { margin: 0; color: #061a43; font-size: 27px; letter-spacing: -.6px; }
.risk-heading p { margin: 3px 0 0; color: #456280; font-size: 17px; }
.risk-heading-actions { gap: 18px; margin-left: auto; }
.risk-count { padding: 12px 22px; border-radius: 9px; background: #fff0f0; color: #e21d18; font-size: 17px; font-weight: 800; white-space: nowrap; }
.view-more-risks { border: 1px solid #8ab4dc; border-radius: 8px; padding: 12px 17px; background: #fff; color: #086bc9; font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.close-risk-button { border: 1px solid #8ab4dc; border-radius: 8px; padding: 12px 17px; background: #fff; color: #086bc9; font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.risk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.risk-card { min-height: 178px; padding: 18px 20px 15px; border: 1px solid #f0ddd7; border-left: 6px solid #ff8f19; border-radius: 9px; background: linear-gradient(115deg, #fff, #fff8f6); }
.risk-card.high { border-left-color: #f51a16; background: linear-gradient(115deg, #fff, #fff3f3); }
.risk-card.attention { border-left-color: #ffbf00; background: linear-gradient(115deg, #fff, #fffaf0); }
.risk-card-top { gap: 13px; color: #071945; font-size: 21px; }
.risk-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #ff8f19; color: #fff; font-size: 24px; font-weight: 900; }
.high .risk-icon { background: #f51a16; }.attention .risk-icon { background: #f0af00; }
.risk-label { margin-left: auto; padding: 7px 13px; border-radius: 7px; background: #fff0e2; color: #dd7100; font-size: 14px; font-weight: 800; white-space: nowrap; }
.high .risk-label { background: #ffe0df; color: #e21a16; }.attention .risk-label { background: #fff2d5; color: #b97700; }
.risk-card > p { min-height: 47px; margin: 13px 0; color: #344b70; font-size: 16px; line-height: 1.35; }
.risk-meta { gap: 18px; padding-top: 13px; border-top: 1px solid #d9dde5; color: #274b78; font-size: 14px; }
.risk-meta span { white-space: nowrap; }

/* Priority table styling follows the supplied priority mockup. */
.jobs-panel th { padding: 14px 18px; background: #f1f5fa; color: #061a43; font-size: 14px; font-weight: 800; }
.jobs-panel td { padding: 10px 18px; color: #10284b; font-size: 15px; }
.jobs-panel .priority { font-size: 16px; }
.jobs-panel .recommendation { color: #10284b; font-weight: 750; line-height: 1.25; }
.jobs-panel .recommendation.start-action { color: #e21e15; }
.jobs-panel .start-action-row { background: #fff8f8; }
.jobs-panel .view-button { min-width: 78px; border-radius: 7px; padding: 10px 16px; }
.jobs-panel .urgent-row { background: linear-gradient(90deg, #fff4f4, #fffafb); }
.jobs-panel .urgent-row td { color: #10284b; }
.jobs-panel .urgent-row .priority, .jobs-panel .urgent-row .recommendation { color: #e21e15; }
.due-soon { display: block; color: #e21e15; font-weight: 800; }
.due-soon small { display: block; font-size: 13px; font-weight: 600; }
.due-overdue { color: #e21e15; font-weight: 800; }

/* Footer workflow stages match the compact chevron treatment in the mockup. */
.workflow { padding: 0; gap: 10px; border: 0; background: transparent; box-shadow: none; }
.stage { height: 94px; padding: 13px 24px; border-radius: 7px; }
.stage:not(:last-child)::after { display: none; }
.stage:nth-child(1) { background: #00a05b !important; color: #00a05b !important; }
.stage:nth-child(2) { background: #2388ee !important; color: #2388ee !important; }
.stage:nth-child(3) { background: #6639f3 !important; color: #6639f3 !important; }
.stage:nth-child(4) { background: #07558d !important; color: #07558d !important; }
.stage-icon { font-size: 39px; }

@media (max-width: 900px) {
  .risk-heading { align-items: flex-start; flex-wrap: wrap; }
  .risk-heading-actions { width: 100%; margin-left: 72px; }
  .risk-cards { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .panel-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .risk-content { padding: 17px; }
  .risk-heading h2 { font-size: 23px; }
  .risk-heading-actions { margin-left: 0; flex-wrap: wrap; }
  .risk-count { font-size: 15px; }
  .risk-meta { flex-wrap: wrap; gap: 7px 15px; }
}
