:root {
  --primary: #2563eb;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

[data-theme="dark"] {
  --primary: #3b82f6;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --gray-50: #111827;
  --gray-100: #1f2937;
  --gray-200: #374151;
  --gray-300: #4b5563;
  --gray-500: #9ca3af;
  --gray-700: #d1d5db;
  --gray-900: #f9fafb;
}

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

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.5;
}

/* Request Form */
.request-form-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 32px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.request-form-container h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--gray-500);
  margin-bottom: 24px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
}

.btn:hover { opacity: 0.9; }

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  width: auto;
}

.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}
.btn-outline:hover { background: var(--gray-100); }

.notice {
  padding: 12px 16px;
  background: #dcfce7;
  color: #166534;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.errors {
  padding: 12px 16px;
  background: #fef2f2;
  color: var(--danger);
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.errors ul { margin-left: 16px; }

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  background: var(--gray-100);
  color: var(--gray-900);
  padding: 20px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.admin-sidebar h2 {
  padding: 0 20px;
  font-size: 18px;
  margin-bottom: 24px;
}

.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
}

.admin-sidebar nav a i {
  width: 16px;
  text-align: center;
}

.admin-sidebar nav a {
  border-left: 3px solid transparent;
}

.admin-sidebar nav a:hover {
  background: rgba(0,0,0,0.05);
  color: #111827;
}

.admin-sidebar nav a.active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.admin-sidebar .sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--gray-200);
}

.admin-sidebar .sidebar-footer a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 13px;
}

.sidebar-user { margin-bottom: 14px; font-size: 12px; color: var(--gray-500); }
.sidebar-user strong { display: block; margin-top: 3px; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-content {
  flex: 1;
  /* Without this, one long unbroken line (a URL, a path) widens the page. */
  min-width: 0;
  padding: 32px;
}

.table-scroll { overflow-x: auto; }

.admin-content h1 {
  font-size: 24px;
  margin-bottom: 24px;
}

/* Cards & Tables */
.stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
  padding: 10px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-200);
}

th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-500);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-fire { background: #fef2f2; color: var(--danger); }
.badge-bug { background: #fefce8; color: var(--warning); }
.badge-feature { background: #eff6ff; color: var(--primary); }
.badge-up { background: #dcfce7; color: var(--success); }
.badge-down { background: #fef2f2; color: var(--danger); }
.badge-stale { background: #fef3c7; color: var(--warning); }
.badge-unknown { background: #f3f4f6; color: var(--gray-500); }

a { color: var(--primary); }

/* Lookout: the dashboard's night-sky strip with a tower per customer */
.lookout {
  background: radial-gradient(ellipse at 50% 120%, #1e3a5f 0%, #0b1220 60%, #05080f 100%);
  color: #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px 0;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  overflow: hidden;
}
.lookout-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.lookout-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9ca3af;
}
.lookout-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #d1d5db;
}
.lookout-summary .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.dot-ok { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.dot-danger { background: #f87171; box-shadow: 0 0 6px #f87171; }
.dot-warning { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.base-map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  border-radius: 10px;
}
.map-label {
  fill: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}
.bunker { cursor: pointer; }
.bunker:hover .bunker-body { fill: #1f2937; }
/* the pip's outline matches the bunker floor, hovered or not */
.bunker:hover .error-pip { stroke: #1f2937; }
.bunker-name { fill: #f3f4f6; font-size: 14px; font-weight: 700; }
.bunker-reason { font-size: 11px; }
.searchlight { animation: sweep 14s linear infinite; }
.sightline-alert { animation: march 1.2s linear infinite; }
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes march { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .searchlight, .sightline-alert { animation: none !important; }
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 4px 14px;
  font-size: 12px;
  color: #9ca3af;
}
.map-legend .lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.map-legend .lamp-ring { background: transparent; border: 2px solid; width: 8px; height: 8px; }
.map-legend .lamp-pip {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 7px 0 2px;
  background: #a78bfa;
  transform: rotate(45deg);
  vertical-align: middle;
}

/* Dashboard columns: watch log beside the environment cards */
.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) 3fr;
  gap: 24px;
  align-items: start;
}
.dashboard-columns h2 { margin-bottom: 12px; font-size: 18px; }
.watch-log .log {
  list-style: none;
  padding: 0;
  margin: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}
.log-entry {
  display: grid;
  grid-template-columns: 82px 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 14px;
  border-left: 3px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
}
.log-entry:last-child { border-bottom: none; }
.log-ok { border-left-color: var(--success); }
.log-danger { border-left-color: var(--danger); }
.log-warning { border-left-color: var(--warning); }
.log-info { border-left-color: var(--primary); }
.log-time { color: var(--gray-500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-icon { color: var(--gray-500); text-align: center; padding-top: 2px; }
.log-ok .log-icon { color: var(--success); }
.log-danger .log-icon { color: var(--danger); }
.log-warning .log-icon { color: var(--warning); }
.log-scope { font-weight: 600; margin-right: 4px; }
[data-theme="dark"] .watch-log .log { background: var(--gray-100); }
@media (max-width: 900px) {
  .dashboard-columns { grid-template-columns: 1fr; }
}

/* Tabs (roadmap and servers pages) */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
}
.tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-500);
  cursor: pointer;
  font-family: inherit;
}
.tab:hover { color: var(--gray-900); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 9px;
  background: var(--gray-200);
  color: var(--gray-900);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.tab.active .tab-count { background: var(--primary); color: white; }
.tab-count.alert, .tab.active .tab-count.alert { background: var(--danger); color: white; }
.tab-panel[hidden] { display: none; }

/* Group cards: one card per customer, environments in a table inside */
.group-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  overflow: hidden;
}
.group-card .group-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--primary);
}
.group-card .group-title {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--gray-900);
}
.group-card .group-title:hover { color: var(--primary); }
.group-card .group-meta {
  font-size: 12px;
  color: var(--gray-500);
}
.group-card table {
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  table-layout: fixed;
}
.group-card.dashboard th:nth-child(1) { width: 22%; }
.group-card.dashboard th:nth-child(2) { width: 14%; }
.group-card.dashboard th:nth-child(3) { width: 14%; }
.group-card.dashboard th:nth-child(5) { width: 18%; }
.group-card.roadmap table { table-layout: auto; }
.group-card.backups th:nth-child(1) { width: 14%; }
.group-card.backups th:nth-child(2) { width: 12%; }
.group-card.backups th:nth-child(3) { width: 8%; }
.group-card.backups th:nth-child(4) { width: 13%; }
.group-card.backups th:nth-child(5) { width: 8%; }
.group-card.backups th:nth-child(6) { width: 13%; }
.group-card.backups th:nth-child(8) { width: 12%; }
.group-card .group-subheader {
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
}
.group-card.servers th:nth-child(1) { width: 14%; }
.group-card.servers th:nth-child(3) { width: 9%; }
.group-card.servers th:nth-child(4) { width: 10%; }
.group-card.servers th:nth-child(5) { width: 8%; }
.group-card.servers th:nth-child(6) { width: 13%; }
.group-card.servers th:nth-child(7) { width: 20%; }

.actions { display: flex; gap: 8px; align-items: center; }

/* Mobile header and overlay hidden by default on desktop */
.mobile-header,
.mobile-overlay {
  display: none !important;
}

.token-url {
  font-family: monospace;
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

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

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

/* Login */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 32px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.login-container h1 {
  margin-bottom: 24px;
  text-align: center;
}

/* Sidebar logo */
.sidebar-logo {
  display: block;
  padding: 0 20px;
  margin-bottom: 24px;
}

.sidebar-logo img {
  width: 100%;
  display: block;
  mix-blend-mode: multiply;
}

/* Dark mode toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 12px;
}

.theme-toggle:hover {
  background: rgba(0,0,0,0.05);
  color: #111827;
}

/* Logout button */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #dc2626;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: 100%;
  justify-content: center;
  transition: opacity 0.2s;
}

.logout-btn:hover {
  opacity: 0.9;
}

/* Dark mode overrides */
[data-theme="dark"] .admin-sidebar {
  background: #0b1220;
  color: var(--gray-900);
  border-right: 1px solid #1f2937;
}
[data-theme="dark"] .admin-sidebar nav a { color: #9ca3af; }
[data-theme="dark"] .admin-sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #f3f4f6; }
[data-theme="dark"] .admin-sidebar nav a.active { color: #93c5fd; background: rgba(59, 130, 246, 0.16); border-left-color: #3b82f6; }
[data-theme="dark"] .admin-sidebar .sidebar-footer { border-top-color: #1f2937; }
[data-theme="dark"] .theme-toggle { border-color: #374151; color: #d1d5db; }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .mobile-header { background: #0b1220; border-bottom: 1px solid #1f2937; }
[data-theme="dark"] .mobile-header .hamburger-btn { color: #d1d5db; }
/* Match the logo artwork to the selected theme, including on initial load. */
.sidebar-logo .logo-dark, .logo-small .logo-dark { display: none; }
[data-theme="dark"] .sidebar-logo .logo-light,
[data-theme="dark"] .logo-small .logo-light { display: none; }
[data-theme="dark"] .sidebar-logo .logo-dark,
[data-theme="dark"] .logo-small .logo-dark { display: block; }
[data-theme="dark"] .sidebar-logo img,
[data-theme="dark"] .logo-small img {
  mix-blend-mode: normal;
  filter: none;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .group-card,
[data-theme="dark"] table,
[data-theme="dark"] .request-form-container,
[data-theme="dark"] .login-container {
  background: var(--gray-100);
  color: var(--gray-900);
}

[data-theme="dark"] th {
  background: var(--gray-50);
}

[data-theme="dark"] .btn-outline {
  background: var(--gray-100);
  color: var(--gray-700);
}

[data-theme="dark"] .btn-outline:hover {
  background: var(--gray-200);
}

[data-theme="dark"] .badge-fire { background: #450a0a; }
[data-theme="dark"] .badge-bug { background: #422006; }
[data-theme="dark"] .badge-feature { background: #1e3a5f; }
[data-theme="dark"] .badge-up { background: #14532d; }
[data-theme="dark"] .badge-down { background: #450a0a; }
[data-theme="dark"] .badge-stale { background: #422006; }
[data-theme="dark"] .badge-unknown { background: #1f2937; }

[data-theme="dark"] .notice {
  background: #14532d;
  color: #86efac;
}

[data-theme="dark"] .errors {
  background: #450a0a;
}

[data-theme="dark"] { color-scheme: dark; }

[data-theme="dark"] input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="file"], [type="color"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-300);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus { border-color: var(--primary); }

[data-theme="dark"] ::placeholder { color: var(--gray-500); }

/* Mobile Responsive (max-width: 768px) */
@media (max-width: 768px) {
  /* Mobile header bar */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 998;
  }

  .mobile-header .hamburger-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-900);
    padding: 8px;
    margin-left: -8px;
    display: flex;
    align-items: center;
  }

  .mobile-header .logo-small {
    height: 32px;
    width: 32px;
    object-fit: contain;
  }

  /* Mobile overlay (for closing sidebar) */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
  }

  .admin-layout.sidebar-open .mobile-overlay {
    display: block;
  }

  /* Admin layout on mobile */
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 220px;
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    height: calc(100vh - 56px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  }

  .admin-layout.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-content {
    padding: 16px;
    margin-top: 56px;
    flex: 1;
  }

  .admin-content h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  /* Stat cards: 2 columns on mobile */
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .stat-card {
    min-width: unset;
  }

  .stat-card .value {
    font-size: 20px;
  }

  /* Section header: stack vertically */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-header .btn {
    width: 100%;
  }

  /* Tables: horizontal scroll */
  .admin-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-content th,
  .admin-content td {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Request form: responsive */
  .request-form-container {
    margin: 16px;
    padding: 24px 16px;
    max-width: 100%;
  }

  .request-form-container h1 {
    font-size: 20px;
  }

  /* Login form: responsive */
  .login-container {
    margin: 16px;
    padding: 24px 16px;
    max-width: 100%;
  }

  .login-container h1 {
    font-size: 20px;
  }

  /* Filter bar wrapping */
  .section-header + div[style*="display: flex"] {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Button full-width in mobile context */
  .btn-sm {
    width: 100%;
  }

  /* Token URL: truncate on mobile */
  .token-url {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
  }
}

/* Development progress and click-to-open app summaries on the base map. */
.bunker-progress-label { fill: #93c5fd; font-size: 9px; }
.map-info-button {
  display: block; width: 20px; height: 20px; padding: 0;
  border: 1px solid #64748b; border-radius: 50%;
  background: #1f2937; color: #e2e8f0; cursor: pointer;
  font: bold 12px/18px Georgia, serif;
}
.map-info-button:focus-visible { outline: 2px solid #93c5fd; }
.tippy-box[data-theme~='map-summary'] { background: #111827; color: #f3f4f6; border: 1px solid #475569; border-radius: 10px; box-shadow: 0 12px 36px #0006; }
.tippy-box[data-theme~='map-summary'] .tippy-arrow { color: #111827; }
.map-summary { padding: 10px; max-height: min(520px, 70vh); overflow-y: auto; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.map-summary-header { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
.map-summary-header strong { font-size: 16px; }
.map-summary-header button { background: transparent; color: #cbd5e1; border: 0; font-size: 24px; cursor: pointer; padding: 0 4px; }
.map-summary h3 { font-size: 12px; color: #cbd5e1; margin: 16px 0 8px; }
.map-summary-muted { color: #9ca3af; }
.map-summary-server { border-top: 1px solid #374151; padding: 8px 0; }
.map-summary ul { padding-left: 18px; margin: 0; }
.map-summary li { margin-bottom: 6px; }
.map-summary-links { display: flex; gap: 20px; margin-top: 14px; }
.map-summary a { color: #93c5fd; }

.token-url.token-url-truncated {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-description { color: var(--gray-500); margin-bottom: 16px; overflow-wrap: anywhere; }
.alert-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.alert-filters select { padding: 8px; border: 1px solid var(--gray-200); border-radius: 4px; background: var(--gray-100); color: var(--gray-900); }
.alert-details { background: var(--gray-100); padding: 20px; border-radius: 8px; }
.alert-details dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px 16px; margin-bottom: 20px; }
.alert-details dt { color: var(--gray-500); }
.alert-details dd { margin: 0; overflow-wrap: anywhere; }
.alert-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.alert-pages { display: flex; gap: 8px; margin-top: 16px; }
.invite-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 28px; }
.invite-form .field { margin-bottom: 0; min-width: min(280px, 100%); }

/* Error tracking */
.table-scroll { overflow-x: auto; }
.error-class { font-weight: 600; }
.error-culprit { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--gray-700); overflow-wrap: anywhere; }
.error-message { font-size: 13px; color: var(--gray-500); overflow-wrap: anywhere; }
.error-muted { font-size: 13px; color: var(--gray-500); overflow-wrap: anywhere; }
.error-where { overflow-wrap: anywhere; min-width: 180px; }
.error-bars { display: block; overflow: visible; }
.error-bar { fill: var(--primary); }
.error-bar-empty { fill: var(--gray-300); }
.error-bar-hit { fill: transparent; }
.error-bar-day:hover .error-bar { opacity: 0.75; }
.error-chart { display: inline-block; max-width: 100%; overflow-x: auto; margin-bottom: 8px; }
.error-chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.error-message-block, .error-context { background: var(--gray-100); color: var(--gray-900); padding: 12px 14px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; margin-bottom: 20px; }
.error-context { padding: 4px 8px; margin: 4px 0 0; font-size: 12px; }
.error-exception { margin-bottom: 16px; }
.error-exception-head { margin-bottom: 6px; overflow-wrap: anywhere; }
.error-frames { margin: 0; padding-left: 22px; font-size: 13px; color: var(--gray-500); }
.error-frames li { margin-bottom: 3px; overflow-wrap: anywhere; }
.error-frames li.in-app { color: var(--gray-900); }

/* AI review panel on an error group */
.ai-review { border: 1px solid var(--gray-200); border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; }
.ai-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ai-review-head h2 { font-size: 16px; margin: 0; }
.ai-review h3 { font-size: 14px; margin: 12px 0 6px; }
.ai-review p { margin: 0 0 8px; overflow-wrap: anywhere; }
.ai-review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-review .error-message-block { margin-bottom: 8px; }
