/* Integra Status Page — Official Brand Design System */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  /* Brand Gradient */
  --gradient-brand: linear-gradient(135deg, #FFAFD6, #F34499, #FC4E23, #F71227);
  --gradient-brand-soft: linear-gradient(135deg, rgba(255,175,214,0.08), rgba(243,68,153,0.06), rgba(252,78,35,0.04));

  /* UI Accents */
  --accent-pink: #FF4F91;
  --accent-yellow: #FFB84C;
  --accent-orange: #FF4F2E;
  --accent-purple: #A855F7;

  /* Semantic (WCAG AA on white) */
  --color-success: #16A34A;
  --color-info: #2563EB;
  --color-warning: #EA580C;
  --color-error: #DC2626;

  /* Light Theme Backgrounds */
  --bg-strong: #FFFFFF;
  --bg-base: #FAFBFC;
  --bg-card: #FFFFFF;
  --bg-surface: #F6F8FA;
  --bg-soft: #E5E7EB;
  --bg-sub: #D1D5DB;
  --bg-hover: #F3F4F6;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Inter', 'Geist Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #F1F5F9 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Skip-to-content link (accessibility) ────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: var(--accent-pink);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 8px;
}

/* Brand-tinted text selection */
::selection {
  background: rgba(243,68,153,0.15);
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════════ */

header {
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,175,214,0.04) 100%);
  padding: 28px 0;
  border-bottom: 1px solid var(--bg-soft);
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0.8;
}

.header-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(243,68,153,0.3);
  padding: 4px;
}

.header-logo svg {
  width: 100%;
  height: 100%;
}

.header-titles h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.header-titles .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── View mode toggle ────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-soft);
  padding: 2px;
  gap: 2px;
}

.view-btn {
  padding: 5px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover { color: var(--text-primary); }

.view-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Overall badge ───────────────────────────────────────────────── */
.overall-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.overall-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.overall-badge.all-up {
  background: rgba(22, 163, 74, 0.08);
  color: var(--color-success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}
.overall-badge.all-up::before { background: var(--color-success); }

.overall-badge.has-degraded {
  background: rgba(234, 88, 12, 0.08);
  color: var(--color-warning);
  border: 1px solid rgba(234, 88, 12, 0.2);
}
.overall-badge.has-degraded::before { background: var(--color-warning); }

.overall-badge.has-down {
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-error);
  border: 1px solid rgba(220, 38, 38, 0.2);
}
.overall-badge.has-down::before { background: var(--color-error); }

.overall-badge.loading {
  background: rgba(160, 160, 160, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(160, 160, 160, 0.15);
}
.overall-badge.loading::before { background: var(--text-muted); }

.last-updated {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Menlo', monospace;
}

/* ══════════════════════════════════════════════════════════════════════
   PROGRESS BAR — thin gradient line that fills over 30s
   ══════════════════════════════════════════════════════════════════════ */

.refresh-bar {
  height: 2px;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}

.refresh-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  transition: width 30s linear;
}

.refresh-bar-fill.complete { width: 100%; }

.refresh-bar-fill.reset {
  transition: none;
  width: 0%;
}

/* ══════════════════════════════════════════════════════════════════════
   STATUS BANNER — full-width status strip below header
   ══════════════════════════════════════════════════════════════════════ */

.status-banner {
  padding: 14px 24px;
  transition: background 0.5s, color 0.3s;
}

.banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.banner-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.banner-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.banner-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: 0.85;
}

.banner-metric {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 11px;
}

.banner-sep {
  opacity: 0.4;
}

/* Banner variants */
.banner-operational {
  background: linear-gradient(90deg, rgba(22,163,74,0.06) 0%, rgba(22,163,74,0.03) 100%);
  color: var(--color-success);
}

.banner-degraded {
  background: linear-gradient(90deg, rgba(234,88,12,0.08) 0%, rgba(234,88,12,0.03) 100%);
  color: var(--color-warning);
}

.banner-outage {
  background: linear-gradient(90deg, rgba(220,38,38,0.08) 0%, rgba(220,38,38,0.03) 100%);
  color: var(--color-error);
  animation: banner-pulse 3s ease-in-out infinite;
}

@keyframes banner-pulse {
  0%, 100% { background-color: rgba(220,38,38,0.04); }
  50% { background-color: rgba(220,38,38,0.10); }
}

/* ══════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════════════ */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ── Page transitions ────────────────────────────────────────────── */
.page-content {
  transition: opacity 150ms ease, transform 150ms ease;
}

.page-exit {
  opacity: 0;
  transform: translateY(4px);
}

.page-enter {
  opacity: 0;
  transform: translateY(-4px);
  animation: page-fade-in 200ms ease forwards;
}

@keyframes page-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════════
   SUMMARY BAR
   ══════════════════════════════════════════════════════════════════════ */

.summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.summary-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--bg-soft);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.summary-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.summary-item:nth-child(1)::before { background: var(--color-success); }
.summary-item:nth-child(2)::before { background: var(--color-warning); }
.summary-item:nth-child(3)::before { background: var(--color-error); }
.summary-item:nth-child(4)::before { background: var(--gradient-brand); }

.summary-item:nth-child(1) { background: linear-gradient(180deg, #FFF, rgba(22,163,74,0.03) 100%); }
.summary-item:nth-child(2) { background: linear-gradient(180deg, #FFF, rgba(234,88,12,0.03) 100%); }
.summary-item:nth-child(3) { background: linear-gradient(180deg, #FFF, rgba(220,38,38,0.03) 100%); }
.summary-item:nth-child(4) { background: linear-gradient(180deg, #FFF, rgba(243,68,153,0.03) 100%); }

.summary-item:hover {
  border-color: var(--bg-sub);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.summary-item .count {
  display: block;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1;
}

.summary-item .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Status colors */
.color-up { color: var(--color-success); }
.color-degraded { color: var(--color-warning); }
.color-down { color: var(--color-error); }
.color-unknown { color: var(--text-muted); }
.color-total {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════════
   INCIDENT TIMELINE
   ══════════════════════════════════════════════════════════════════════ */

.incident-timeline {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.section-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}

.incident-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connector line */
.incident-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--bg-soft);
}

.incident-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}

.incident-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
  border: 2px solid var(--bg-card);
}

.incident-dot-up { background: var(--color-success); }
.incident-dot-degraded { background: var(--color-warning); }
.incident-dot-down { background: var(--color-error); }

.incident-ongoing {
  animation: incident-pulse 2s ease-in-out infinite;
}

@keyframes incident-pulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 4px rgba(220,38,38,0.15); }
}

.incident-info {
  flex: 1;
  min-width: 0;
}

.incident-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.incident-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Menlo', monospace;
  margin-top: 1px;
}

.incident-show-more {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.incident-show-more:hover {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
  background: rgba(243,68,153,0.04);
}

/* ══════════════════════════════════════════════════════════════════════
   ENVIRONMENT FILTER TABS
   ══════════════════════════════════════════════════════════════════════ */

.env-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  padding: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  overflow-x: auto;
}

.env-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.env-tab:hover {
  color: var(--text-primary);
  background: var(--bg-soft);
}

.env-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Environment badges ──────────────────────────────────────────── */
.env-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.env-badge.env-prod {
  background: rgba(22, 163, 74, 0.08);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.env-badge.env-dev {
  background: rgba(37, 99, 235, 0.08);
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.env-badge.env-staging {
  background: rgba(168, 85, 247, 0.08);
  color: #A855F7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.env-badge.env-release {
  background: rgba(234, 88, 12, 0.08);
  color: #EA580C;
  border: 1px solid rgba(234, 88, 12, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════════════════════════════ */

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-soft);
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(243,68,153,0.08);
}

.search-icon {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-clear {
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.search-clear:hover {
  color: var(--text-primary);
  background: var(--bg-soft);
}

.search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.search-no-results-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════════════════
   STATUS SEGMENTS BAR — per-card health visualization
   ══════════════════════════════════════════════════════════════════════ */

.status-segments {
  display: flex;
  gap: 1px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.status-segment {
  flex: 1;
  transition: background 0.5s;
}

.status-segment.up { background: var(--color-success); }
.status-segment.degraded { background: var(--color-warning); }
.status-segment.down { background: var(--color-error); }

/* ══════════════════════════════════════════════════════════════════════
   APP CARDS (MINIMAL VIEW) — redesigned
   ══════════════════════════════════════════════════════════════════════ */

.app-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  overflow: hidden;
}

.app-card:hover {
  border-color: var(--bg-sub);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  /* no translateY — full-width cards stay anchored */
}

/* Status bar — 4px gradient at top of card */
.card-status-bar {
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: background 0.5s;
}

.status-bar-up { background: var(--color-success); }
.status-bar-degraded { background: var(--color-warning); }
.status-bar-down { background: var(--color-error); }

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  cursor: default;
}

.app-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-card-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.app-card-name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}

.app-card-name:hover {
  color: var(--accent-pink);
}

.app-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.app-card-count {
  font-size: 11px;
  font-family: 'SF Mono', monospace;
  margin-top: 2px;
}

.app-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.app-card-uptime {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.5px;
  color: var(--color-success);
}

.app-card-uptime.uptime-warn {
  color: var(--color-warning);
}

/* Status segments in card */
.app-card > .status-segments {
  margin: 4px 20px 0;
  height: 8px;
}

/* ── Card Metrics Bar ── */
.card-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--bg-soft);
  margin: 0 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-metric {
  background: var(--bg-card);
  padding: 12px 16px;
  text-align: center;
}

.card-metric-value {
  display: block;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.card-metric-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
  font-weight: 500;
}

.card-metric-value.metric-success { color: var(--color-success); }
.card-metric-value.metric-warning { color: var(--color-warning); }
.card-metric-value.metric-error { color: var(--color-error); }
.card-metric-value.metric-brand {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Card Large Sparkline ── */
.card-sparkline-section {
  padding: 8px 20px 4px;
}

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

.card-sparkline-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.card-sparkline-value {
  font-size: 11px;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--text-secondary);
}

/* ── Endpoints inside Card (always visible) ── */
.card-endpoints {
  border-top: 1px solid var(--bg-soft);
  margin: 12px 0 0;
  padding: 0;
}

.card-endpoints-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 8px;
}

.card-endpoints-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

.card-endpoints .endpoint {
  padding: 10px 20px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--bg-surface);
  box-shadow: none;
  margin: 0;
}

.card-endpoints .endpoint:last-child {
  border-bottom: none;
}

.card-endpoints .endpoint:hover {
  background: var(--bg-hover);
  transform: none;
  box-shadow: none;
}

/* ══════════════════════════════════════════════════════════════════════
   ENDPOINT ROWS
   ══════════════════════════════════════════════════════════════════════ */

.endpoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-soft);
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.15s ease;
  cursor: pointer;
}

.endpoint:hover {
  border-color: var(--bg-sub);
  background: var(--bg-hover);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.endpoint-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.endpoint-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Status dots with glow + pulse */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.status-dot.up {
  background: var(--color-success);
  box-shadow: 0 0 4px rgba(22, 163, 74, 0.3);
  animation: pulse-green 4s ease-in-out infinite;
}

.status-dot.degraded {
  background: var(--color-warning);
  box-shadow: 0 0 4px rgba(234, 88, 12, 0.3);
  animation: pulse-orange 2.5s ease-in-out infinite;
}

.status-dot.down {
  background: var(--color-error);
  box-shadow: 0 0 4px rgba(220, 38, 38, 0.3);
  animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 3px rgba(22, 163, 74, 0.2); }
  50% { box-shadow: 0 0 8px rgba(22, 163, 74, 0.4); }
}

@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 0 3px rgba(234, 88, 12, 0.2); }
  50% { box-shadow: 0 0 8px rgba(234, 88, 12, 0.4); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 3px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.5); }
}

.endpoint-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

a.endpoint-name {
  text-decoration: none;
  transition: color 0.15s;
}

a.endpoint-name:hover {
  color: var(--accent-pink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.endpoint-name-btn {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color 0.15s;
}

.endpoint-name-btn:hover { color: var(--accent-pink); }

.endpoint-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
  line-height: 1.3;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Endpoint sparkline inline */
.endpoint-sparkline {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.up {
  background: rgba(22, 163, 74, 0.08);
  color: var(--color-success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.badge.degraded {
  background: rgba(234, 88, 12, 0.08);
  color: var(--color-warning);
  border: 1px solid rgba(234, 88, 12, 0.2);
}

.badge.down {
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-error);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.detail {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Menlo', monospace;
}

.response-time {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 50px;
  text-align: right;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.rt-fast { color: var(--color-success); }
.rt-slow { color: var(--color-warning); }

.error-text {
  font-size: 11px;
  color: var(--color-warning);
  max-width: 280px;
}

/* ── Impact warning inline ──────────────────────────────────────── */
.impact-warning {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  margin-top: 4px;
  background: rgba(234, 88, 12, 0.06);
  border: 1px solid rgba(234, 88, 12, 0.15);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--color-warning);
  line-height: 1.4;
}

.impact-warning-icon {
  flex-shrink: 0;
  font-size: 12px;
}

.impact-warning-text { flex: 1; }
.impact-warning-text strong { font-weight: 600; }

/* ── Blast radius badge ──────────────────────────────────────────── */
.blast-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.08);
  color: #7C3AED;
  border: 1px solid rgba(168, 85, 247, 0.2);
  cursor: help;
}

/* ── Status change flash ─────────────────────────────────────────── */
@keyframes status-flash {
  0% { background: rgba(243,68,153,0.06); }
  100% { background: var(--bg-card); }
}

.endpoint.status-changed {
  animation: status-flash 1s ease-out;
}

/* ══════════════════════════════════════════════════════════════════════
   CATEGORY VIEW (ADVANCED MODE)
   ══════════════════════════════════════════════════════════════════════ */

.category {
  margin-bottom: 28px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-soft);
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.category-header:hover {
  background: var(--bg-hover);
  margin-left: -8px;
  margin-right: -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.category-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.category-chevron.collapsed {
  transform: rotate(-90deg);
}

.category-icon {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.category h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
  padding: 0;
  border: none;
}

.category-uptime {
  font-size: 11px;
  font-weight: 600;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--color-success);
  margin-left: 4px;
}

.category-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.endpoint-list.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   SPARKLINE SVG STYLING
   ══════════════════════════════════════════════════════════════════════ */

.sparkline-svg {
  display: block;
}

.sparkline-line {
  /* stroke-dasharray and stroke-dashoffset set in JS; animated via transition */
}

.sparkline-area {
  opacity: 0.6;
}

.sparkline-dot {
  transition: opacity 0.3s;
}

/* ══════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════════════ */

.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1500;
  pointer-events: none;
  max-width: 360px;
  width: 100%;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit {
  animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-out {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.toast-message {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Toast progress bar — shrinks over 8s auto-dismiss */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-muted);
  opacity: 0.3;
  transform-origin: left;
  animation: toast-progress-shrink 8s linear forwards;
}

@keyframes toast-progress-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Toast status variants */
.toast-success { border-left: 3px solid var(--color-success); }
.toast-success .toast-icon { color: var(--color-success); }
.toast-success .toast-progress { background: var(--color-success); }

.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-warning .toast-progress { background: var(--color-warning); }

.toast-error { border-left: 3px solid var(--color-error); }
.toast-error .toast-icon { color: var(--color-error); }
.toast-error .toast-progress { background: var(--color-error); }

/* ══════════════════════════════════════════════════════════════════════
   SERVICE DETAIL DRILL-DOWN PAGE
   ══════════════════════════════════════════════════════════════════════ */

.detail-page {
  max-width: 720px;
  margin: 0 auto;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 24px;
}

.back-btn:hover {
  color: var(--text-primary);
  border-color: var(--bg-sub);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Detail header */
.detail-header {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.detail-header-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.detail-header-info {
  flex: 1;
  min-width: 0;
}

.detail-name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.detail-rich-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.detail-header-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--bg-soft);
}

.detail-uptime {
  font-size: 14px;
  font-weight: 600;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--color-success);
}

.detail-uptime.uptime-warn {
  color: var(--color-warning);
}

.uptime-warn { color: var(--color-warning); }

.detail-rt {
  font-size: 12px;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--text-muted);
}

.detail-not-found {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Detail sections */
.detail-section {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.detail-section .section-title {
  margin-bottom: 12px;
}

/* Large sparkline container */
.detail-sparkline-large {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.detail-sparkline-large svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Detail description */
.detail-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-soft);
}

/* Detail owner card */
.detail-owner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-soft);
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.detail-owner-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand-soft);
  border: 1px solid var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--accent-pink);
}

.detail-owner-info { flex: 1; }

.detail-owner-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-owner-role {
  font-size: 11px;
  color: var(--text-muted);
}

.detail-owner-contact {
  font-size: 11px;
  color: var(--accent-pink);
  font-family: 'SF Mono', monospace;
}

/* Detail quick links */
.detail-quick-links {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-soft);
  background: var(--bg-card);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.detail-link-btn:hover {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  background: rgba(243,68,153,0.04);
}

.detail-link-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.detail-link-icon { font-size: 13px; }

/* Detail tags */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
  background: rgba(168, 85, 247, 0.08);
  color: #7C3AED;
  border: 1px solid rgba(168, 85, 247, 0.15);
  letter-spacing: 0.2px;
}

.detail-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-response-time {
  font-size: 12px;
  font-family: 'SF Mono', monospace;
  color: var(--text-muted);
}

.detail-env-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-separator {
  height: 1px;
  background: var(--bg-soft);
  margin: 16px 0;
}

/* ══════════════════════════════════════════════════════════════════════
   DEPENDENCY GRAPH + CASCADE TREE
   ══════════════════════════════════════════════════════════════════════ */

.dep-mini-graph {
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 12px;
  overflow-x: auto;
}

.dep-mini-graph svg text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  fill: var(--text-primary);
}

.dep-graph-svg {
  display: block;
}

.dep-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-soft);
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-primary);
}

.dep-item-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.dep-item-dot.up { background: var(--color-success); }
.dep-item-dot.down { background: var(--color-error); }
.dep-item-dot.degraded { background: var(--color-warning); }
.dep-item-dot.unknown { background: var(--text-muted); }

.dep-item-name { flex: 1; }

.dep-item-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Status-colored left borders */
.dep-item-border-up { border-left: 2px solid var(--color-success); }
.dep-item-border-degraded { border-left: 2px solid var(--color-warning); }
.dep-item-border-down { border-left: 2px solid var(--color-error); }
.dep-item-border-unknown { border-left: 2px solid var(--text-muted); }

.dep-impact-text {
  padding: 10px 12px;
  background: rgba(234, 88, 12, 0.06);
  border: 1px solid rgba(234, 88, 12, 0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-warning);
  line-height: 1.5;
}

/* Cascade tree items */
.dep-cascade-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-soft);
  margin-bottom: 3px;
  font-size: 12px;
  transition: background 0.15s;
}

.dep-cascade-item:hover {
  background: var(--bg-hover);
}

.dep-cascade-depth {
  font-size: 9px;
  color: var(--text-muted);
  font-family: 'SF Mono', monospace;
  min-width: 14px;
}

/* ══════════════════════════════════════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-soft) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

.skeleton-card {
  pointer-events: none;
  padding: 20px;
}

.skeleton-header {
  height: 20px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-line {
  height: 14px;
  width: 80%;
  margin-bottom: 8px;
}

.skeleton-line.short { width: 40%; }

/* ══════════════════════════════════════════════════════════════════════
   ERROR BANNER
   ══════════════════════════════════════════════════════════════════════ */

.error-banner {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-top: 20px;
  color: var(--color-error);
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════════════════ */

.hidden { display: none; }

/* ══════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════ */

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--bg-soft);
}

footer .brand {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

footer .refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

footer .dot {
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  animation: pulse-green 3s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════════════
   FOCUS RINGS (ACCESSIBILITY)
   ══════════════════════════════════════════════════════════════════════ */

.env-tab:focus-visible,
.view-btn:focus-visible,
.endpoint:focus-visible,
.app-card:focus-visible,
.endpoint-name-btn:focus-visible,
.back-btn:focus-visible,
.incident-show-more:focus-visible,
.toast-close:focus-visible {
  outline: 2px solid var(--accent-pink);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════
   SECTION NAVIGATION SIDEBAR
   ══════════════════════════════════════════════════════════════════════ */

.section-nav {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 176px;
  background: var(--bg-card);
  border: 1px solid var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 100;
  max-height: 70vh;
  overflow-y: auto;
}

.section-nav-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 4px 14px 8px;
}

.section-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.section-nav-item.active {
  color: var(--text-primary);
  font-weight: 600;
  border-left-color: var(--accent-pink);
  background: rgba(243,68,153,0.04);
}

.section-nav-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.section-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-left: auto;
}

.section-nav-dot.up { background: var(--color-success); }
.section-nav-dot.degraded { background: var(--color-warning); }
.section-nav-dot.down { background: var(--color-error); }

.section-nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Hide sidebar when viewport is too narrow for it */
@media (max-width: 1280px) {
  .section-nav { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET / MOBILE
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .card-metrics-bar { grid-template-columns: repeat(2, 1fr); }
  .app-card-header { padding: 14px 16px 10px; }
  .card-metrics-bar { margin: 0 16px; }
  .card-sparkline-section { padding: 8px 16px 4px; }
  .card-endpoints .endpoint { padding: 10px 16px; }
  .app-card > .status-segments { margin: 4px 16px 0; }
}

@media (max-width: 640px) {
  .header-content { flex-direction: column; align-items: flex-start; }
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
  .env-tabs { flex-wrap: wrap; }

  .endpoint {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 12px;
    gap: 10px;
  }

  .endpoint-left {
    min-width: 0;
    flex: 1;
    width: 100%;
  }

  .endpoint-right {
    width: 100%;
    justify-content: space-between;
  }

  .endpoint-desc { max-width: 100%; }
  .response-time { text-align: left; }
  .detail { font-size: 10px; }

  .refresh-bar { width: 100%; }

  .detail-quick-links { flex-wrap: wrap; }
  .detail-header-top { flex-direction: column; }
  .detail-header-metrics { flex-wrap: wrap; }

  .banner-inner { flex-direction: column; align-items: flex-start; gap: 8px; }

  .toasts {
    right: 8px;
    left: 8px;
    max-width: none;
    width: auto;
  }

  .dep-mini-graph { overflow-x: scroll; }

  .app-card-header { flex-wrap: wrap; }

  .env-tab,
  .view-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .back-btn {
    min-height: 44px;
  }
}

@media (max-width: 400px) {
  .summary-bar { grid-template-columns: 1fr; }
  .card-metrics-bar { grid-template-columns: 1fr; }
}
