/* ✅ Scoped Dashboard Styles */
.rbi-dashboard {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f5f5f5;
  color: #333;
}
.rbi-dashboard h1 {
  color: #333;
  margin-bottom: 20px;
}

/* Dashboard Layout */
.rbi-dashboard .dashboard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}
.rbi-dashboard .summary-box {
  flex: 1;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 15px;
  min-width: 250px;
}
.rbi-dashboard .summary-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #444;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}
.rbi-dashboard .summary-value {
  font-size: 18px;
  font-weight: bold;
  color: #007bff;
  min-height: 24px;
}
.rbi-dashboard .link-btn {
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
}

/* Modal */
.rbi-dashboard .modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.rbi-dashboard .modal-content {
  background: #fff;
  width: 95%;
  max-width: 1000px;
  padding: 30px;
  border-radius: 10px;
  overflow-y: auto;
  max-height: 90vh;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.rbi-dashboard .close-btn {
  float: right;
  font-size: 22px;
  cursor: pointer;
  color: #888;
}
.rbi-dashboard .close-btn:hover {
  color: #000;
}

/* Form Grid Layout */
.rbi-dashboard .grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.rbi-dashboard .form-group {
  background: #fafafa;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.rbi-dashboard label {
  font-weight: bold;
  margin-bottom: 6px;
}
.rbi-dashboard input,
.rbi-dashboard select {
  padding: 8px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #bbb;
}

/* Button */
.rbi-dashboard button {
  margin-top: 20px;
  padding: 12px 20px;
  background: #007bff;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.rbi-dashboard button:hover {
  background: #0056b3;
}

/* Result Box */
.rbi-dashboard .result {
  margin-top: 20px;
  background: #fff;
  padding: 15px;
  border: 1px solid #ccc;
}



.risk-matrix {
  border-collapse: collapse;
  width: 100%;
  text-align: center;
}

.risk-matrix th, .risk-matrix td {
  border: 1px solid #ccc;
  padding: 8px;
}

.risk-matrix .low {
  background: #28a745; /* green */
  color: white;
}

.risk-matrix .medium {
  background: #ffc107; /* yellow */
  color: black;
}

.risk-matrix .high {
  background: #fd7e14; /* orange */
  color: white;
}

.risk-matrix .extreme {
  background: #dc3545; /* red */
  font-weight: bold;
  color: white;
}


.risk-output {
  margin-top: 10px;
  font-weight: bold;
}

/* Highlight selected risk cell */
.selected-risk {
  outline: 3px solid black;
  box-shadow: inset 0 0 0 2px white;
}

