/* Status badges - unified */
.status-badge { display:inline-flex; align-items:center; padding:0.125rem 0.5rem; border-radius:9999px; font-weight:500; font-size:0.75rem; }
.status-healthy { background-color: rgba(56,224,123,0.1); color:#38e07b; }
.status-ok { background-color: rgba(56,224,123,0.1); color:#38e07b; }
.status-unhealthy { background-color: rgba(255,107,107,0.1); color:#ff6b6b; }
.status-error { background-color: rgba(255,107,107,0.1); color:#ff6b6b; }
.status-unexpected { background-color: rgba(255,193,7,0.1); color:#ffc107; }
.status-warning { background-color: rgba(255,193,7,0.1); color:#ffc107; }
.status-slow { background-color: rgba(255,193,7,0.1); color:#ffc107; }
.status-dot { width:0.375rem; height:0.375rem; border-radius:9999px; margin-right:0.375rem; }
.status-ok .status-dot, .status-healthy .status-dot { background-color:#38e07b; }
.status-error .status-dot, .status-unhealthy .status-dot { background-color:#ff6b6b; }
.status-unexpected .status-dot, .status-warning .status-dot, .status-slow .status-dot { background-color:#ffc107; }

/* Search highlight */
.search-highlight { background-color: rgba(56,224,123,0.2); padding: 0.125rem 0.25rem; border-radius: 0.25rem; }

/* Toast notifications */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { min-width: 200px; max-width: 350px; padding: 1rem; border-radius: 0.5rem; background: #1f2937; border-left: 4px solid; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3); animation: slideIn 0.3s ease; }
.toast.success { border-color: #38e07b; }
.toast.error { border-color: #ff6b6b; }
.toast.warning { border-color: #ffc107; }
.toast.info { border-color: #3b82f6; }
.toast-content { display: flex; align-items: flex-start; gap: 0.5rem; }
.toast-icon { flex-shrink: 0; }
.toast-message { flex: 1; font-size: 0.875rem; }
.toast-close { background: none; border: none; color: #9ca3af; cursor: pointer; padding: 0; flex-shrink: 0; }
.toast-close:hover { color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.toast.closing { animation: slideOut 0.3s ease forwards; }

/* Database table styles */
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #222; }
.data-table th { background: rgba(255,255,255,0.05); font-weight: 600; }
.data-table tr:hover { background: rgba(255,255,255,0.02); }
.truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Markdown content styles */
.md a { color: #38e07b; text-decoration: underline; }
.md h1, .md h2, .md h3, .md h4 { color: #fff; font-weight: 700; margin-top: .75rem; margin-bottom: .25rem; }
.md p { margin: .25rem 0; color: rgba(255,255,255,0.9); }
.md ul { list-style: disc; padding-left: 1.25rem; }
.md strong { color: #fff; }
.md code { background: rgba(255,255,255,0.06); padding: 0 .25rem; border-radius: .25rem; }
.md pre { background: rgba(0,0,0,0.4); border: 1px solid rgba(56,224,123,0.2); border-radius: .75rem; padding: .75rem; overflow:auto; }

/* Generic badge and box styles */
.badge { display:inline-block; padding:0 .35rem; border-radius:.5rem; background:rgba(56,224,123,0.15); color:#38e07b; }
.meta { color:rgba(255,255,255,.6); font-size: .75rem; margin-bottom: .25rem; }
.box { background: rgba(17,17,17,0.8); border: 1px solid rgba(56,224,123,0.2); border-radius: .75rem; padding: .75rem; }

/* Model detail chip */
.chip { display:inline-flex; align-items:center; gap:.25rem; padding:.125rem .5rem; border-radius:9999px; font-size:.7rem; border:1px solid rgba(139,92,246,.4); color: rgb(216,180,254); background: rgba(139,92,246,.12); }

/* Mobile responsive styles */
.model-card { background: #111; border: 1px solid #222; border-radius: 8px; padding: 12px; margin-bottom: 8px; }

@media (max-width: 640px) {
  #sidebar.open {
    transform: translateX(0) !important;
  }
  #mainContent.shifted {
    transform: translateX(256px);
  }
  .table-desktop {
    display: none;
  }
  .cards-mobile {
    display: block;
  }
}

@media (min-width: 641px) {
  .table-desktop {
    display: table;
  }
  .cards-mobile {
    display: none;
  }
}

/* Heatmap styles */
.heatmap-cell { position: relative; }
.heatmap-cell:hover .tooltip { display: block; }
.tooltip { 
  display: none; 
  position: absolute; 
  bottom: 100%; 
  left: 50%; 
  transform: translateX(-50%); 
  background: rgba(0,0,0,0.9); 
  border: 1px solid rgba(56,224,123,0.3); 
  border-radius: 6px; 
  padding: 8px 12px; 
  font-size: 0.75rem; 
  color: #fff; 
  white-space: nowrap; 
  z-index: 1000; 
  pointer-events: none;
}
.tooltip strong { color: #38e07b; }
.names-col { width: clamp(140px, 22ch, 260px); }
.grid-col { min-width: 480px; }

#heatmapContainer {
  display: grid;
  grid-template-columns: 200px repeat(var(--heatmap-cols, 24), 1fr);
  gap: 1px;
  background-color: transparent;
  padding: 0;
}

.heatmap-header {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: #e5e7eb;
  padding: 4px 0;
  text-align: center;
}

.model-label {
  padding: 4px 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #e5e7eb;
}

.model-name-link {
  padding: 4px 0;
  color: #38e07b;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.model-name-link:hover {
  color: #5fffa8;
  text-decoration: underline;
}

.heatmap-hour-label {
  text-align: center;
  font-size: 0.65rem;
  color: #6b7280;
  padding: 4px 0;
}

.square {
  width: var(--cell-size, 45px);
  height: var(--cell-size, 45px);
  border-radius: 3px;
}

.intensity-0 { background-color: rgba(22,163,74,0.3); }
.intensity-1 { background-color: rgba(34,197,94,0.6); }
.intensity-2 { background-color: rgba(234,179,8,0.9); }
.intensity-3 { background-color: rgba(239,68,68,1); }
.intensity-4 { background-color: rgba(220,38,38,1); }

/* Issues badge styles */
.badge { display:inline-flex; align-items:center; padding:0.125rem 0.5rem; border-radius:9999px; font-weight:600; font-size:0.75rem; }
.warn { background: rgba(255,215,0,0.12); color:#FFD700; }
.err { background: rgba(255,59,59,0.12); color:#ff3b3b; }
.dot { width:0.5rem; height:0.5rem; border-radius:9999px; margin-right:0.375rem; }
.warn .dot { background:#FFD700; }
.err .dot { background:#ff3b3b; }
