body {
  background: #fff;
  color: #111;
  min-height: auto;
  height: auto;
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.3px;
}

.card {
  border-radius: 10px;
  border-color: #eee;
}

.table th, .table td {
  vertical-align: middle;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.form-check-label {
  font-weight: 500;
}

#appsTable td code {
  user-select: all;
}

#alertArea .alert {
  border-radius: 8px;
}

/* Ensure text-muted elements are visible */
.text-muted {
  color: #6c757d !important;
}

/* Ensure empty elements don't cause layout issues */
.text-muted:empty,
div:empty,
span:empty {
  display: none;
}

/* Ensure all text elements have proper color */
p, div, span, td, th, label, h1, h2, h3, h4, h5, h6 {
  color: inherit;
}

/* Fix Bootstrap tab layout issues */
.tab-pane:not(.show) {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.tab-pane.show {
  display: block !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
}

/* Debug: Add border to empty elements to see them */
/* Uncomment the next line to debug invisible elements */
/* div:empty, span:empty { border: 1px solid red; min-height: 10px; } */

/* Fix tab content height issues */
.tab-content {
  padding-top: 0 !important;
  min-height: auto;
  height: auto;
  overflow: visible;
}

.tab-pane {
  padding-top: 0;
  min-height: auto;
  height: auto;
  overflow: visible;
}

/* Ensure container doesn't force extra height */
.container {
  min-height: auto;
  height: auto;
  overflow: visible;
}

/* Prevent any flex or grid from expanding height */
.row {
  min-height: auto;
}

.col-12, .col-lg-6, .col-md-6 {
  min-height: auto;
}

/* Remove bottom margin from last elements in tab panes */
.tab-pane .card:last-child {
  margin-bottom: 0;
}

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

/* Reduce spacing in cards and forms */
.card-body {
  padding: 1rem;
}

.card-body h2.h6 {
  margin-bottom: 0.75rem;
}

.card-body p.text-muted {
  margin-bottom: 0.75rem;
}

.form-label {
  margin-bottom: 0.25rem;
}

.mb-3 {
  margin-bottom: 0.75rem !important;
}

/* App dropdown styles */
.dropdown-menu {
  max-height: 200px;
  overflow-y: auto;
}

.dropdown-item {
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-item.text-muted {
  cursor: default;
}

.dropdown-item.text-muted:hover {
  background-color: transparent;
}

/* Scope filtering styles */
.form-check-input:disabled + .form-check-label {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-check-input:disabled {
  cursor: not-allowed;
}

.form-check-label.text-muted {
  font-style: italic;
}
