/* KAVACH Health Dashboard Styles */

:root {
  /* Color Palette */
  --bg-primary: #f8f9fa;
  --bg-sidebar: #1e293b;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;

  /* Domain Colors */
  --color-applications: #f97316;
  --color-services: #3b82f6;
  --color-databases: #10b981;
  --color-infrastructure: #ef4444;
  --color-network: #14b8a6;

  /* Alert Colors */
  --alert-critical: #ef4444;
  --alert-high: #f97316;
  --alert-warning: #eab308;

  /* Health Score */
  --health-good: #22c55e;
  --health-warning: #eab308;
  --health-critical: #ef4444;

  /* Spacing */
  --sidebar-width: 60px;
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  z-index: 100;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.sidebar-logo svg {
  width: 20px;
  height: 20px;
  color: white;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  margin-top: auto;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px 32px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.header-left h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.header-left h1 span {
  font-weight: 400;
  color: var(--text-secondary);
}

.header-left p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.last-updated {
  font-size: 13px;
  color: var(--text-secondary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

/* Overall Health Section */
.overall-health {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 40px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.03);
}

.health-score-ring {
  position: relative;
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 4px 12px rgba(34, 197, 94, 0.2));
}

.health-score-ring svg {
  transform: rotate(-90deg);
}

.health-score-ring circle {
  fill: none;
  stroke-width: 10;
}

.health-score-ring .bg-ring {
  stroke: #e5e7eb;
}

.health-score-ring .progress-ring {
  stroke: var(--health-good);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.health-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.health-score-value .score {
  font-size: 36px;
  font-weight: 800;
  color: var(--health-good);
  line-height: 1;
  letter-spacing: -0.02em;
}

.health-score-value .label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-top: 4px;
}

.health-info h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.health-info p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.health-badges {
  display: flex;
  gap: 12px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
  transform: translateY(-2px);
}

.badge-critical {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.badge-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

.badge-info {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

.badge svg {
  width: 16px;
  height: 16px;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 600;
}

/* Domain Cards Grid */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.domain-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.domain-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

.domain-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}

/* Card accent colors with gradients */
.domain-card.applications::before {
  background: linear-gradient(90deg, var(--color-applications), #ff8c42);
}

.domain-card.services::before {
  background: linear-gradient(90deg, var(--color-services), #3b82f6);
}

.domain-card.databases::before {
  background: linear-gradient(90deg, var(--color-databases), #22d3ee);
}

.domain-card.infrastructure::before {
  background: linear-gradient(90deg, var(--color-infrastructure), #f472b6);
}

.domain-card.network::before {
  background: linear-gradient(90deg, var(--color-network), #84cc16);
}

/* Subtle background glow on hover */
.domain-card.applications:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.02) 0%, white 100%);
}

.domain-card.services:hover {
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.02) 0%, white 100%);
}

.domain-card.databases:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.02) 0%, white 100%);
}

.domain-card.infrastructure:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.02) 0%, white 100%);
}

.domain-card.network:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.02) 0%, white 100%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.trend-indicator {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.trend-indicator:hover {
  transform: scale(1.1);
}

.trend-indicator.up {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
}

.trend-indicator.down {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

.trend-indicator svg {
  width: 14px;
  height: 14px;
}

.card-score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.score-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.score-value {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.domain-card.applications .score-value {
  color: var(--color-applications);
}

.domain-card.services .score-value {
  color: var(--color-services);
}

.domain-card.databases .score-value {
  color: var(--color-databases);
}

.domain-card.infrastructure .score-value {
  color: var(--color-infrastructure);
}

.domain-card.network .score-value {
  color: var(--color-network);
}

.score-badge {
  display: none;
  /* Hidden - replaced with percentage symbol */
}

/* Percentage symbol after score */
.score-value::after {
  content: '%';
  font-size: 20px;
  font-weight: 600;
  margin-left: 2px;
  opacity: 0.7;
}

.card-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.metric-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.metric-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

/* Metric row colors with status indicators */
.metric-row.healthy .metric-label {
  color: #16a34a;
}

.metric-row.healthy .metric-value {
  color: #16a34a;
}

.metric-row.unhealthy .metric-label {
  color: #dc2626;
}

.metric-row.unhealthy .metric-value {
  color: #dc2626;
}

.metric-row.up .metric-label {
  color: #16a34a;
}

.metric-row.up .metric-value {
  color: #16a34a;
}

.metric-row.down .metric-label {
  color: #dc2626;
}

.metric-row.down .metric-value {
  color: #dc2626;
}

.metric-row.predictions .metric-label {
  color: #2563eb;
}

.metric-row.predictions .metric-value {
  color: #2563eb;
}

.metric-row.alerts .metric-label {
  color: #dc2626;
}

.metric-row.alerts .metric-value {
  color: #dc2626;
}

/* Compact metrics for Infrastructure */
.card-metrics.compact {
  gap: 6px;
}

.card-metrics.compact .metric-row {
  font-size: 12px;
  padding: 4px 8px;
}

/* Tooltip Styles */
.metric-row.has-tooltip {
  position: relative;
  cursor: pointer;
}

.metric-row.has-tooltip:hover {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  margin: -2px -4px;
  padding: 2px 4px;
}

.tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 10px;
  /* Use padding instead of margin to maintain hover connection */
  z-index: 1000;
}

.tooltip-content {
  background: var(--bg-sidebar);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  min-width: 220px;
  max-width: 320px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.tooltip-content::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 20px;
  border: 6px solid transparent;
  border-bottom-color: var(--bg-sidebar);
}

/* Keep tooltip visible when hovering over it */
.metric-row.has-tooltip:hover .tooltip,
.metric-row.has-tooltip .tooltip:hover {
  display: block;
}

.tooltip-title {
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tooltip-list li {
  padding: 6px 8px;
  margin: 2px -8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.tooltip-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tooltip-list li.clickable {
  cursor: pointer;
}

.tooltip-list li.clickable:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tooltip-list li.clickable .item-name {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.tooltip-list li::before {
  content: '•';
  color: var(--text-light);
  flex-shrink: 0;
}

.tooltip-list li.healthy::before {
  color: #22c55e;
}

.tooltip-list li.unhealthy::before {
  color: var(--alert-critical);
}

.tooltip-list li .item-name {
  flex: 1;
}

.tooltip-list li .view-link {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: auto;
}

.tooltip-list li.clickable:hover .view-link {
  color: rgba(255, 255, 255, 0.9);
}

.tooltip-empty {
  color: var(--text-light);
  font-style: italic;
}

/* Dashboard Modal Overlay */
.dashboard-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dashboard-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dashboard-modal {
  background: var(--bg-card);
  border-radius: 12px;
  width: 90%;
  height: 85%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.dashboard-modal-overlay.active .dashboard-modal {
  transform: scale(1);
}

.dashboard-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.dashboard-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-modal-header .modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.dashboard-modal-header .modal-close:hover {
  background: #d1d5db;
}

.dashboard-modal-header .modal-close svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

.dashboard-modal-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.dashboard-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0 0 12px 12px;
}

.dashboard-modal-body .loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.dashboard-modal-body .loading-spinner::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--color-services);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Critical Alerts Section */
.alerts-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.alerts-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.view-all-link {
  font-size: 13px;
  color: var(--color-services);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-all-link:hover {
  text-decoration: underline;
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.alert-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.alert-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.severity-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-badge.critical {
  background: var(--alert-critical);
  color: white;
}

.severity-badge.high {
  background: var(--alert-high);
  color: white;
}

.alert-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.alert-source {
  font-size: 12px;
  color: var(--text-light);
  margin-left: auto;
}

.alert-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.alert-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Loading States */
.loading {
  opacity: 0.5;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Responsive */

/* Large Desktop (1400px+) */
@media (max-width: 1600px) {
  .domain-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

/* Desktop (1200px - 1400px) */
@media (max-width: 1400px) {
  .domain-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .domain-card {
    padding: 16px;
  }

  .score-value {
    font-size: 32px;
  }
}

/* Tablet Landscape (1024px - 1200px) */
@media (max-width: 1200px) {
  .main-content {
    padding: 20px 24px;
  }

  .overall-health {
    padding: 20px;
    gap: 24px;
  }

  .health-info p {
    max-width: 350px;
  }

  .health-badges {
    flex-wrap: wrap;
    gap: 8px;
  }

  .badge {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Table responsive - horizontal scroll */
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* Tablet Portrait (768px - 1024px) */
@media (max-width: 1024px) {
  .domain-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .alerts-grid {
    grid-template-columns: 1fr;
  }

  .header-left h1 {
    font-size: 20px;
  }

  .header-left p {
    font-size: 12px;
  }

  .overall-health {
    flex-direction: row;
    align-items: flex-start;
  }

  .health-score-ring {
    width: 100px;
    height: 100px;
  }

  .health-score-ring svg {
    width: 100px;
    height: 100px;
  }

  .health-score-value .score {
    font-size: 28px;
  }

  .health-info h2 {
    font-size: 18px;
  }

  .health-info p {
    font-size: 13px;
    max-width: 300px;
  }

  /* Problems and Alerts sections */
  .problems-section,
  .alerts-section {
    padding: 16px;
  }

  .section-header-row h2 {
    font-size: 15px;
  }

  .view-all-link {
    font-size: 12px;
  }

  /* Full page adjustments */
  .full-page-container {
    padding: 20px;
  }

  .page-header h1 {
    font-size: 20px;
  }
}

/* Mobile Landscape / Large Mobile (576px - 768px) */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    padding: 8px 16px;
    z-index: 1000;
    justify-content: space-around;
  }

  .sidebar-logo {
    margin-bottom: 0;
    width: 32px;
    height: 32px;
  }

  .sidebar-logo svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 8px;
    flex: 1;
    justify-content: space-around;
  }

  .nav-item {
    width: 36px;
    height: 36px;
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .main-content {
    margin-left: 0;
    margin-bottom: 60px;
    padding: 16px;
  }

  .domain-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .domain-card {
    padding: 16px;
  }

  .card-header h3 {
    font-size: 13px;
  }

  .score-value {
    font-size: 28px;
  }

  .score-badge {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }

  .card-metrics {
    gap: 6px;
  }

  .metric-row {
    font-size: 12px;
  }

  .overall-health {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 16px;
  }

  .health-score-ring {
    width: 100px;
    height: 100px;
  }

  .health-score-value .score {
    font-size: 26px;
  }

  .health-score-value .label {
    font-size: 9px;
  }

  .health-info {
    text-align: center;
  }

  .health-info h2 {
    font-size: 16px;
  }

  .health-info p {
    font-size: 12px;
    max-width: 100%;
  }

  .health-badges {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .badge {
    padding: 6px 10px;
    font-size: 11px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-left h1 {
    font-size: 18px;
  }

  .header-left h1 svg {
    width: 24px !important;
    height: 24px !important;
  }

  .header-left p {
    font-size: 11px;
  }

  /* Problems and Alerts sections mobile */
  .problems-section,
  .alerts-section {
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 10px;
  }

  .section-header-row {
    margin-bottom: 12px;
  }

  .section-header-row h2 {
    font-size: 14px;
  }

  .view-all-link {
    font-size: 11px;
  }

  /* Table mobile - card style */
  .data-table {
    font-size: 11px;
  }

  .data-table th {
    padding: 8px 10px;
    font-size: 10px;
  }

  .data-table td {
    padding: 8px 10px;
  }

  .severity-badge {
    padding: 3px 6px;
    font-size: 9px;
  }

  /* Hide description column on mobile */
  .data-table th:nth-child(5),
  .data-table td:nth-child(5) {
    display: none;
  }

  /* Full page mobile */
  .full-page-container {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-header h1 {
    font-size: 18px;
  }

  .page-header h1 svg {
    width: 22px !important;
    height: 22px !important;
  }

  .back-link {
    font-size: 12px;
  }

  .total-count {
    font-size: 12px;
  }

  /* Tooltip adjustments for mobile */
  .tooltip {
    left: auto;
    right: 0;
    top: 100%;
    transform: none;
    margin-left: 0;
    margin-top: 8px;
    max-width: 250px;
    min-width: 180px;
  }

  .tooltip::before {
    display: none;
  }

  /* Empty state mobile */
  .empty-state {
    padding: 24px 12px;
  }

  .empty-state svg {
    width: 36px;
    height: 36px;
  }

  .empty-state .empty-title {
    font-size: 13px;
  }

  .empty-state .empty-subtitle {
    font-size: 11px;
  }
}

/* Small Mobile (under 576px) */
@media (max-width: 576px) {
  .main-content {
    padding: 12px;
  }

  .header-left h1 {
    font-size: 16px;
  }

  .overall-health {
    padding: 12px;
  }

  .health-score-ring {
    width: 90px;
    height: 90px;
  }

  .health-score-ring svg {
    width: 90px;
    height: 90px;
  }

  .health-score-value .score {
    font-size: 24px;
  }

  .health-info h2 {
    font-size: 14px;
  }

  .health-info p {
    font-size: 11px;
    line-height: 1.4;
  }

  .health-badges {
    gap: 6px;
  }

  .badge {
    padding: 5px 8px;
    font-size: 10px;
  }

  .badge svg {
    width: 12px;
    height: 12px;
  }

  .domain-card {
    padding: 12px;
  }

  .card-header {
    margin-bottom: 8px;
  }

  .card-score {
    margin-bottom: 12px;
    gap: 8px;
  }

  .score-value {
    font-size: 24px;
  }

  .score-badge {
    width: 32px;
    height: 32px;
    font-size: 10px;
    border-width: 2px;
  }

  .section-header-row h2 {
    font-size: 13px;
  }

  /* Table very small mobile - hide more columns */
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .data-table th,
  .data-table td {
    padding: 6px 8px;
  }

  .page-header h1 {
    font-size: 16px;
  }

  .sidebar {
    padding: 6px 12px;
  }

  .nav-item {
    width: 32px;
    height: 32px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }
}

/* Problems Section */
.problems-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header-row h2 {
  font-size: 16px;
  font-weight: 600;
}

/* Data Table Styles */
.data-table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.data-table .loading-cell {
  text-align: center;
  color: var(--text-secondary);
  padding: 32px;
}

.data-table .empty-cell {
  text-align: center;
  color: var(--text-secondary);
  padding: 32px;
}

/* Severity Badges for Tables */
.severity-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.severity-badge.disaster {
  background: #7f1d1d;
  color: white;
}

.severity-badge.high {
  background: var(--alert-critical);
  color: white;
}

.severity-badge.average {
  background: var(--alert-high);
  color: white;
}

.severity-badge.warning {
  background: var(--alert-warning);
  color: #1e293b;
}

.severity-badge.info {
  background: #3b82f6;
  color: white;
}

.severity-badge.ok {
  background: var(--health-good);
  color: white;
}

/* Empty State with Icon */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: #22c55e;
}

.empty-state .empty-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.empty-state .empty-subtitle {
  font-size: 12px;
  color: var(--text-light);
}

/* Full Page Styles */
.full-page-container {
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 600;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-services);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

.total-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}