AdminKit-style alerts base .alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.alert .alert-message {
  margin: 0;
  line-height: 1.5;
}

.alert-success {
  color: #075E54;
  background-color: #D6F6EB;
  border-color: #3ED2A4;
}

.alert-danger {
  color: #8B1E3E;
  background-color: #FBE9EA;
  border-color: #E2536D;
}

.alert-warning {
  color: #4D4400;
  background-color: #FFF9E6;
  border-color: #FFE27B;
}

.alert-info {
  color: #0B4D8F;
  background-color: #E9F6FF;
  border-color: #6DB4FF;
}

.alert-primary {
  color: #004E8C;
  background-color: #E6F2FF;
  border-color: #4A9DFF;
}

/* Dismiss button support (Bootstrap) */
.alert-dismissible .btn-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  color: inherit;
}

/* Procedure Variables Styling */
.form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}

.form-section-header {
  margin-bottom: 1rem;
}

.form-section-header h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.form-section-header .form-help {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0;
}

.variables-container {
  margin-bottom: 1rem;
}

.variable-row {
  margin-bottom: 0.75rem;
}

.variable-row:last-child {
  margin-bottom: 0;
}

.variable-row .form-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.variable-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.variable-row .form-group.col-auto {
  flex: 0 0 auto;
}

.variable-row .remove-variable {
  margin-bottom: 0;
  white-space: nowrap;
}

.add-variable {
  margin-top: 0.5rem;
}

/* Execution Variables Display */
.execution-variables {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.execution-variables h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}

.variables-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.variable-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background-color: white;
  border-radius: 0.25rem;
  border: 1px solid #dee2e6;
  font-family: monospace;
  font-size: 0.875rem;
}

.variable-item .variable-key {
  color: #0066cc;
  font-weight: 600;
}

.variable-item .variable-value {
  color: #28a745;
  margin-left: 0.25rem;
}

.variable-item span {
  color: #6c757d;
  margin: 0 0.25rem;
}

/* Real-time Procedure Execution Updates */
.step-output-card.step-new {
  animation: slideIn 0.5s ease-out;
  border-left: 4px solid #28a745;
}

.step-output-card.step-updated {
  animation: pulse 0.5s ease-out;
  border-left: 4px solid #ffc107;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    background-color: transparent;
  }

  50% {
    background-color: #fff9e6;
  }
}

/* Execution info message states */
.execution-info.success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
}

.execution-info.error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
}

/* Step output card styling improvements */
.step-output-card {
  transition: all 0.3s ease;
}

.steps-output-list {
  min-height: 100px;
}

/* ========================================
   Status Donut Chart Styles
   ======================================== */

/* Resource Status Card */
.resource-status-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.resource-status-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #495057;
}

.resource-status-card .card-title svg {
  width: 18px;
  height: 18px;
}

/* Chart Wrapper */
.status-chart-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.status-donut-chart {
  transform: rotate(0deg);
}

/* Donut Chart Segments */
.donut-segment {
  transition: stroke-width 0.3s ease;
}

.donut-segment:hover {
  stroke-width: 12;
}

.donut-segment.animated {
  animation: donutSegmentDraw 0.8s ease-out forwards;
}

@keyframes donutSegmentDraw {
  from {
    stroke-dasharray: 0 282.74;
  }
}

/* Chart Center Text */
.chart-total-text {
  font-family: inherit;
}

.chart-total-text .total-number {
  font-size: 1.5rem;
  font-weight: 700;
  fill: #495057;
}

.chart-total-text .total-label {
  font-size: 0.625rem;
  font-weight: 500;
  fill: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Chart Center Content (for foreignObject) */
.chart-center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.chart-total-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: #495057;
  line-height: 1;
}

/* Status Legend */
.status-legend {
  padding-left: 0.5rem;
}

.legend-row {
  padding: 0.25rem 0;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.legend-label {
  color: #6c757d;
  display: flex;
  align-items: center;
}

.legend-icon {
  width: 12px;
  height: 12px;
}

.legend-count {
  color: #495057;
  font-size: 0.875rem;
}

/* Donut Chart Legend (for standalone chart partial) */
.status-donut-chart .chart-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.status-donut-chart .chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-donut-chart .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-donut-chart .legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-donut-chart .legend-item .legend-icon {
  width: 14px;
  height: 14px;
}

.status-donut-chart .legend-value {
  margin-left: auto;
  font-weight: 600;
  color: #495057;
}

/* Empty state for charts */
.donut-ring-empty {
  opacity: 0.5;
}

/* Dashboard Stats Animation */
.stat-updated {
  animation: statFlash 0.6s ease-out;
}

@keyframes statFlash {
  0% {
    background-color: rgba(16, 185, 129, 0.2);
  }

  100% {
    background-color: transparent;
  }
}

/* Chart responsive adjustments */
@media (max-width: 576px) {
  .resource-status-card .row {
    flex-direction: column;
  }

  .resource-status-card .col-5,
  .resource-status-card .col-7 {
    width: 100%;
    max-width: 100%;
    flex: none;
  }

  .status-legend {
    padding-left: 0;
    margin-top: 1rem;
  }
}

/* Dark theme support */
[data-theme="dark"] .resource-status-card .card-title {
  color: #e9ecef;
}

[data-theme="dark"] .chart-total-text .total-number {
  fill: #e9ecef;
}

[data-theme="dark"] .chart-total-text .total-label {
  fill: #adb5bd;
}

[data-theme="dark"] .chart-total-count {
  color: #e9ecef;
}

[data-theme="dark"] .legend-count {
  color: #e9ecef;
}

[data-theme="dark"] .legend-label {
  color: #adb5bd;
}

[data-theme="dark"] .donut-ring-bg,
[data-theme="dark"] .donut-ring-empty {
  stroke: #495057;
}

/* ========================================
   Sidebar Brand Logo Styles
   ======================================== */

/* Override sidebar-brand to stack logo above name */
.sidebar-brand {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* Logo container with adaptive background for both light/dark logos */
.sidebar-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.3rem;
  border-radius: 0.5rem;
  /* Neutral semi-transparent background that works with any logo */
  background: rgba(128, 128, 128, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(128, 128, 128, 0.1);
}

/* Logo image sizing */
.sidebar-logo-img {
  max-width: 140px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Button group styling for button_to forms */
.btn-group form {
  display: inline;
  margin: 0;
  padding: 0;
}

.btn-group form button {
  display: inline-block;
  vertical-align: middle;
}

.btn-group form button.br-0 {
  border-radius: 0rem;
}

.btn-group form button.br-1 {
  border-top-left-radius: 1px;
  border-bottom-left-radius: 1px;
}

/* Center button content (text + icon) */
/* Center button content (text + icon) */
.btn.btn-centered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}