/* ==========================================================================
   Prakalp Monitor • Premium Dark Theme Design System
   ========================================================================== */

:root {
  --bg-base: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #162035;
  --bg-surface-hover: #1e2942;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-glow: rgba(99, 102, 241, 0.25);

  /* Status Colors */
  --status-up: #10b981;
  --status-up-bg: rgba(16, 185, 129, 0.12);
  --status-up-border: rgba(16, 185, 129, 0.3);

  --status-down: #ef4444;
  --status-down-bg: rgba(239, 68, 68, 0.12);
  --status-down-border: rgba(239, 68, 68, 0.3);

  --status-degraded: #f59e0b;
  --status-degraded-bg: rgba(245, 158, 11, 0.12);
  --status-degraded-border: rgba(245, 158, 11, 0.3);

  --status-paused: #64748b;
  --status-paused-bg: rgba(100, 116, 139, 0.12);
  --status-paused-border: rgba(100, 116, 139, 0.3);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Base Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  width: 100%;
  flex: 1;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-pulse {
  width: 12px;
  height: 12px;
  background-color: var(--status-up);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--status-up);
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.timezone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg-surface-elevated);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.timezone-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #38bdf8;
}

.auto-refresh-pill {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2px 4px;
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.2s;
}

.pill-btn.active {
  color: var(--text-main);
}

.refresh-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-up);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

.icon-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* ==========================================================================
   Metrics Overview Grid
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-label {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
  font-family: var(--font-sans);
}

.metric-sub {
  font-size: 0.725rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.metric-up .metric-value { color: var(--status-up); }
.metric-down .metric-value { color: var(--status-down); }
.metric-degraded .metric-value { color: var(--status-degraded); }
.metric-paused .metric-value { color: var(--status-paused); }

/* ==========================================================================
   Projects & Monitors Section
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 7px 14px;
  font-size: 0.825rem;
  font-family: inherit;
  width: 280px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--border-focus);
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ==========================================================================
   3-Column Unified Monitors Grid
   ========================================================================== */
.monitors-unified-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1280px) {
  .monitors-unified-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .monitors-unified-grid {
    grid-template-columns: 1fr;
  }
}

.project-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-group-header {
  background: var(--bg-surface-elevated);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.project-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 12px;
}

.monitors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  padding: 16px 20px;
}

/* ==========================================================================
   Monitor Card (Modern 3-Column Design)
   ========================================================================== */
.monitor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.monitor-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.4);
}

.card-project-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-pill-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 3px 9px;
  border-radius: 6px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.card-crash-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.725rem;
  font-weight: 500;
}

.monitor-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.monitor-name-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.monitor-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.15s;
}

.monitor-title:hover {
  color: var(--accent-primary);
}

.monitor-url {
  font-size: 0.785rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: color 0.15s;
}

.monitor-url:hover {
  color: #818cf8;
  text-decoration: underline;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-up {
  background: var(--status-up-bg);
  color: var(--status-up);
  border: 1px solid var(--status-up-border);
}
.badge-up .badge-dot { background-color: var(--status-up); }

.badge-down {
  background: var(--status-down-bg);
  color: var(--status-down);
  border: 1px solid var(--status-down-border);
}
.badge-down .badge-dot { background-color: var(--status-down); }

.badge-degraded {
  background: var(--status-degraded-bg);
  color: var(--status-degraded);
  border: 1px solid var(--status-degraded-border);
}
.badge-degraded .badge-dot { background-color: var(--status-degraded); }

.badge-paused {
  background: var(--status-paused-bg);
  color: var(--status-paused);
  border: 1px solid var(--status-paused-border);
}
.badge-paused .badge-dot { background-color: var(--status-paused); }

.badge-pending {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.badge-pending .badge-dot { background-color: #94a3b8; }

/* Monitor Metrics Row */
.monitor-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.metric-unit {
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.uptime-badge {
  font-weight: 600;
}
.uptime-badge.high { color: var(--status-up); }
.uptime-badge.med { color: var(--status-degraded); }
.uptime-badge.low { color: var(--status-down); }

/* Latency Sparkline Bar */
.sparkline-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  padding-top: 4px;
}

.sparkline-bar {
  flex: 1;
  background-color: rgba(99, 102, 241, 0.4);
  border-radius: 2px;
  min-height: 4px;
  transition: height 0.2s ease, background 0.2s ease;
  position: relative;
}

.sparkline-bar:hover {
  background-color: var(--accent-primary);
}

.sparkline-bar.down {
  background-color: var(--status-down);
}

.sparkline-bar.degraded {
  background-color: var(--status-degraded);
}

/* Card Actions */
.monitor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: 2px;
}

.monitor-last-checked {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-tiny {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-icon-tiny:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-icon-tiny.delete:hover {
  background: var(--status-down-bg);
  color: var(--status-down);
  border-color: var(--status-down-border);
}

/* ==========================================================================
   Incidents Section
   ========================================================================== */
.incidents-section {
  margin-top: 36px;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main);
}

.incidents-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.incident-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.incident-row:last-child {
  border-bottom: none;
}

.incident-project {
  font-weight: 600;
  color: var(--text-main);
}

.incident-reason {
  color: var(--status-down);
  font-family: var(--font-mono);
}

.incident-time {
  color: var(--text-dim);
}

.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-dialog.modal-lg {
  max-width: 860px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.modal-body-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-body {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.required {
  color: var(--status-down);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
}

.font-mono {
  font-family: var(--font-mono) !important;
}

.field-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 4px 0;
}

.inline-input-btn {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Details Modal Custom Elements
   ========================================================================== */
.details-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.stat-pill {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pill-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.chart-container-box {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
}

.chart-legend-label {
  font-size: 0.725rem;
  color: var(--text-dim);
}

.table-responsive {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.775rem;
  text-align: left;
}

.data-table th {
  background: var(--bg-surface-elevated);
  padding: 8px 12px;
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table tr:hover {
  background: var(--bg-surface-hover);
}

.snippet-code-box {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-header {
  background: var(--bg-surface-elevated);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.snippet-code-box pre {
  padding: 16px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #38bdf8;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 14px 24px;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Spinner */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 12px;
  color: var(--text-muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-right {
    width: 100%;
    flex-wrap: wrap;
  }
  .monitors-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
}

/* Advanced Settings Accordion */
.advanced-settings-accordion {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 4px;
}

.advanced-summary {
  cursor: pointer;
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
  user-select: none;
  outline: none;
}

.advanced-summary:hover {
  color: var(--text-main);
}

.advanced-settings-body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   Sleek Custom Scrollbars & UX Enhancements
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* All-in-One Smart Banner */
.all-in-one-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(56, 189, 248, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner-badge {
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #818cf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.banner-tag {
  font-size: 0.675rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.banner-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.banner-desc strong {
  color: var(--text-main);
}

.banner-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.check-item {
  font-size: 0.725rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-item svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.mode-select {
  background: var(--bg-surface-elevated) !important;
  color: #818cf8 !important;
  font-weight: 600;
  cursor: default;
}

/* ==========================================================================
   Project Group Header & In-Project Error Box
   ========================================================================== */
.project-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-errors-box {
  margin: 16px 20px 20px 20px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.project-errors-header {
  background: rgba(239, 68, 68, 0.12);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(239, 68, 68, 0.18);
}

.errors-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #fca5a5;
}

.errors-header-sub {
  font-size: 0.7rem;
  color: #f87171;
  opacity: 0.85;
}

.project-errors-list {
  display: flex;
  flex-direction: column;
}

.project-error-row {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s ease;
}

.project-error-row:last-child {
  border-bottom: none;
}

.project-error-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.error-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.error-http-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.error-path-text {
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 500;
}

.error-time-pill {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
}

.error-msg-text {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.775rem;
  font-family: var(--font-mono);
}


