/* ═══════════════════════════════════════════════════════
   Project Hub — Production Dark Theme
   Design System: Linear-inspired, Vercel border philosophy
   ═══════════════════════════════════════════════════════ */

/* ─── Design Tokens (CSS Custom Properties) ─── */
:root {
  /* Colors */
  --bg-canvas: #08090a;
  --bg-panel: #0f1011;
  --bg-surface: #191a1b;
  --bg-elevated: #23252a;
  --text-primary: #f7f8f8;
  --text-secondary: #8a8f98;
  --text-tertiary: #62666d;
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 9999px;

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 64px;
}


/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-canvas);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "cv01", "ss03";
}


/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}


/* ─── Sidebar ─── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo-icon {
  flex-shrink: 0;
}

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

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.sidebar-link i {
  font-size: 18px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(94, 106, 210, 0.12);
  color: var(--accent-hover);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-footer-text {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}


/* ─── Main Content ─── */
#mainContent {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-canvas);
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--space-xl);
  background: rgba(8, 9, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.main-header h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

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

.status-text {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}


/* ─── Status Dots ─── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-active {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
  animation: pulse-green 2s infinite;
}

.status-pending {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  animation: pulse-yellow 2s infinite;
}

.status-error {
  background: var(--error);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: pulse-red 2s infinite;
}


/* ─── Views ─── */
.view {
  display: none;
  padding: var(--space-xl);
  animation: fadeInUp 0.3s ease;
}

.view.active {
  display: block;
}


/* ─── Projects Grid ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}


/* ─── Cards ─── */
.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.2s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.project-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.35s ease both;
}

.project-card:nth-child(2) { animation-delay: 0.04s; }
.project-card:nth-child(3) { animation-delay: 0.08s; }
.project-card:nth-child(4) { animation-delay: 0.12s; }
.project-card:nth-child(5) { animation-delay: 0.16s; }
.project-card:nth-child(6) { animation-delay: 0.20s; }

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 106, 210, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card:hover::before {
  opacity: 1;
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.card-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}


/* ─── Empty State ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  grid-column: 1 / -1;
  animation: fadeInUp 0.4s ease;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 320px;
}


/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn i {
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 0 20px rgba(94, 106, 210, 0.25);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.btn-ghost:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover:not(:disabled) {
  background: #34d399;
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-danger:active:not(:disabled) {
  transform: scale(0.98);
}


/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}


/* ─── Stack Badges ─── */
.stack-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stack-node {
  background: rgba(94, 106, 210, 0.15);
  color: var(--accent-hover);
}

.stack-static {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.stack-python {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}


/* ─── Forms ─── */
.form-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 600px;
  animation: fadeInUp 0.3s ease;
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.form-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 106, 210, 0.12);
  border-radius: var(--radius-lg);
  color: var(--accent-hover);
  font-size: 20px;
  flex-shrink: 0;
}

.form-card-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.form-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.required {
  color: var(--accent);
}

.label-hint {
  font-weight: 400;
  color: var(--text-tertiary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  transition: all 0.15s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238a8f98' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  margin-top: 8px;
}


/* ─── Project Detail ─── */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  animation: fadeInUp 0.3s ease;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: 24px;
  animation: fadeInUp 0.35s ease;
}

.detail-card h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

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

.detail-info .card-desc {
  margin-bottom: 10px;
}

.detail-info .card-desc:last-child {
  margin-bottom: 0;
}

.link {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color 0.15s ease;
  word-break: break-all;
}

.link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}


/* ─── Deployments Card ─── */
.deployments-card {
  animation: fadeInUp 0.4s ease;
}

.deployments-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}


/* ─── Tables ─── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

thead th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

thead th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

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

tbody tr {
  transition: background 0.1s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.text-muted {
  color: var(--text-tertiary);
  font-size: 12px;
}


/* ─── Toasts ─── */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 20px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
  pointer-events: auto;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left: 3px solid var(--success);
}

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

.toast.info {
  border-left: 3px solid var(--accent);
}

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


/* ─── Loading / Skeleton ─── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  height: 180px;
  border-radius: var(--radius-lg);
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}

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

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 13px;
}


/* ─── Deploy Progress ─── */
.deploy-progress {
  background: rgba(94, 106, 210, 0.08);
  border: 1px solid rgba(94, 106, 210, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeInUp 0.3s ease;
}

.deploy-progress-text {
  font-size: 13px;
  color: var(--accent-hover);
  font-weight: 500;
}


/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

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

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 4px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
}

@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
}


/* ─── Status Monitor ─── */
.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.3s ease;
}

.status-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.status-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.35s ease;
}

.status-summary-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.2s ease;
}

.status-summary-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.status-summary-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.status-summary-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.status-summary-online .status-summary-number {
  color: var(--success);
}

.status-summary-offline .status-summary-number {
  color: var(--error);
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeInUp 0.4s ease;
}

.status-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.status-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.status-item-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-item-indicator {
  flex-shrink: 0;
}

.status-indicator-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-indicator-online {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
  animation: pulse-green 2s infinite;
}

.status-indicator-offline {
  background: var(--error);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: pulse-red 2s infinite;
}

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

.status-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.status-item-url {
  font-size: 12px;
  font-family: var(--font-mono);
  word-break: break-all;
}

.status-item-checks {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.status-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.status-check i {
  font-size: 12px;
}

.status-check-ok {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.status-check-error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

.status-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  min-width: 80px;
}

.status-response-time {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.status-last-checked {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.status-item-detail {
  padding: 6px 0 0 26px;
  font-size: 12px;
}


/* ─── Light Theme Overrides ─── */
[data-theme="light"] {
  --bg-canvas: #fafbfc;
  --bg-panel: #ffffff;
  --bg-surface: #f0f2f5;
  --bg-elevated: #e8eaed;
  --text-primary: #1a1a1a;
  --text-secondary: #5a5d65;
  --text-tertiary: #8a8f98;
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --accent: #5e6ad2;
  --accent-hover: #4b57b8;
}

[data-theme="light"] .main-header {
  background: rgba(250, 251, 252, 0.85);
}

[data-theme="light"] .card:hover {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .project-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.14);
}

[data-theme="light"] * {
  scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
}

[data-theme="light"] .toast {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .sidebar-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sidebar-link.active {
  background: rgba(94, 106, 210, 0.1);
}

[data-theme="light"] .btn-ghost {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(94, 106, 210, 0.15);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] thead th {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .skeleton {
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.03) 25%,
    rgba(0, 0, 0, 0.06) 50%,
    rgba(0, 0, 0, 0.03) 75%
  );
  background-size: 200% 100%;
}

[data-theme="light"] .loading-spinner {
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .deploy-progress {
  background: rgba(94, 106, 210, 0.06);
  border-color: rgba(94, 106, 210, 0.15);
}

[data-theme="light"] .status-summary-card {
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .status-summary-card:hover {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .status-item {
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .status-item:hover {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.12);
}


/* ─── Icon Button (Theme toggle, Palette trigger) ─── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 16px;
  flex-shrink: 0;
}

[data-theme="light"] .btn-icon {
  background: rgba(0, 0, 0, 0.03);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}


/* ─── Palette Trigger Button ─── */
.palette-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 0 10px 0 8px;
}

.palette-shortcut-hint {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}


/* ─── Search Bar ─── */
.search-bar {
  position: relative;
  margin-bottom: var(--space-md);
  max-width: 400px;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 10px 38px 10px 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .search-bar input {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .search-bar input:focus {
  background: rgba(255, 255, 255, 0.9);
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
}

[data-theme="light"] .search-clear {
  background: rgba(0, 0, 0, 0.05);
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

[data-theme="light"] .search-clear:hover {
  background: rgba(0, 0, 0, 0.08);
}


/* ─── Deployment Chart ─── */
.chart-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: 24px;
  animation: fadeInUp 0.45s ease;
}

[data-theme="light"] .chart-card {
  background: rgba(0, 0, 0, 0.01);
}

.chart-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.chart-container {
  position: relative;
}

.chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-bar {
  fill: var(--accent);
  rx: 3;
  transition: opacity 0.15s ease;
}

.chart-bar:hover {
  opacity: 0.8;
  fill: var(--accent-hover);
}

.chart-grid-line {
  stroke: var(--border-subtle);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-label {
  fill: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  text-anchor: middle;
}

.chart-count {
  fill: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  text-anchor: middle;
  font-weight: 500;
}

.chart-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}


/* ─── Command Palette ─── */
.palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 160px);
  animation: fadeIn 0.15s ease;
}

.palette-overlay.open {
  display: flex;
}

.palette-modal {
  width: 560px;
  max-width: 90vw;
  max-height: 440px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: paletteIn 0.15s ease;
}

[data-theme="light"] .palette-modal {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.palette-search-icon {
  font-size: 17px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.palette-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
}

.palette-input-wrap input::placeholder {
  color: var(--text-tertiary);
}

.palette-kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

[data-theme="light"] .palette-kbd {
  background: rgba(0, 0, 0, 0.04);
}

.palette-footer kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  margin: 0 2px;
}

[data-theme="light"] .palette-footer kbd {
  background: rgba(0, 0, 0, 0.04);
}

.palette-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.1s ease;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.palette-item:hover,
.palette-item.selected {
  background: rgba(94, 106, 210, 0.1);
  color: var(--text-primary);
}

[data-theme="light"] .palette-item:hover,
[data-theme="light"] .palette-item.selected {
  background: rgba(94, 106, 210, 0.08);
}

.palette-item i {
  font-size: 17px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.palette-item.selected i,
.palette-item:hover i {
  color: var(--accent);
}

.palette-item-label {
  flex: 1;
}

.palette-item-shortcut {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  display: flex;
  gap: 3px;
}

.palette-item-shortcut kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}

[data-theme="light"] .palette-item-shortcut kbd {
  background: rgba(0, 0, 0, 0.04);
}

.palette-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

.palette-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}


/* ─── Keyframes for new components ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes paletteIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ─── Responsive ─── */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #mainContent {
    margin-left: 0;
  }

  .main-header {
    padding: 0 16px;
  }

  .view {
    padding: 16px;
  }

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

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

  .detail-actions {
    flex-wrap: wrap;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .status-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-item-main {
    flex-wrap: wrap;
  }

  .status-item-checks {
    width: 100%;
    padding-left: 26px;
  }

  .status-meta {
    padding-left: 26px;
    flex-direction: row;
    gap: 12px;
  }
}


/* ─── GitHub OAuth Button ─── */
.github-btn {
  position: relative;
}

.github-btn.github-connected {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.github-btn.github-connected:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.github-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .github-btn.github-connected {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

[data-theme="light"] .github-btn.github-connected:hover {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}


/* ─── GitHub Repos Dropdown ─── */
.github-repos-dropdown {
  position: fixed;
  top: 80px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  max-height: 480px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 500;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.2s ease;
}

[data-theme="light"] .github-repos-dropdown {
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.github-repos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.github-repos-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.github-repos-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.github-repos-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.github-repos-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.github-repo-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.1s ease;
}

.github-repo-item:hover {
  background: rgba(94, 106, 210, 0.1);
}

.github-repo-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.github-repo-private {
  display: inline-flex;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.github-repo-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.github-repo-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.github-repo-lang {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-hover);
  background: rgba(94, 106, 210, 0.12);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}

.github-repo-branch {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}


/* ─── SVG Chart Utilities ─── */
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-svg text {
  font-family: var(--font-mono);
}

.chart-svg .chart-grid-line {
  stroke: var(--border-subtle);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-svg .chart-axis-label {
  fill: var(--text-tertiary);
  font-size: 10px;
  text-anchor: middle;
}

.chart-svg .chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-svg .chart-line-area {
  fill: url(#areaGradient);
  opacity: 0.15;
}

.chart-svg .chart-line-dot {
  fill: var(--accent);
  stroke: var(--bg-surface);
  stroke-width: 2;
}

.chart-svg .chart-bar-rect {
  fill: var(--accent);
  rx: 3;
  transition: opacity 0.15s ease;
}

.chart-svg .chart-bar-rect:hover {
  opacity: 0.8;
  fill: var(--accent-hover);
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-tooltip.visible {
  opacity: 1;
}


/* ─── Gauge Container ─── */
.gauge-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  width: 100%;
  height: auto;
  max-width: 200px;
}

.gauge-svg .gauge-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
  stroke-linecap: round;
}

.gauge-svg .gauge-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.gauge-svg .gauge-text {
  fill: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-sans);
  text-anchor: middle;
  dominant-baseline: central;
}

.gauge-svg .gauge-label {
  fill: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  text-anchor: middle;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ─── Status Charts Grid ─── */
.status-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.35s ease;
}

.status-chart-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.2s ease;
}

.status-chart-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .status-chart-card {
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .status-chart-card:hover {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.12);
}

.status-chart-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-chart-card h4 i {
  font-size: 15px;
  opacity: 0.6;
}


/* ─── Auto-Refresh Indicator ─── */
.auto-refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .auto-refresh-indicator {
  background: rgba(0, 0, 0, 0.02);
}

.auto-refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-green 2s infinite;
}

.auto-refresh-dot.paused {
  background: var(--warning);
  animation: pulse-yellow 2s infinite;
}

.last-updated {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}


/* ─── Timeline ─── */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 16px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding: 8px 0 16px 0;
  animation: fadeInUp 0.3s ease both;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:nth-child(2) { animation-delay: 0.05s; }
.timeline-item:nth-child(3) { animation-delay: 0.1s; }
.timeline-item:nth-child(4) { animation-delay: 0.15s; }
.timeline-item:nth-child(5) { animation-delay: 0.2s; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  z-index: 1;
}

.timeline-dot.dot-success {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.15);
}

.timeline-dot.dot-error {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.15);
}

.timeline-dot.dot-pending {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.15);
}

.timeline-dot i {
  font-size: 10px;
  color: var(--text-primary);
}

.timeline-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

.timeline-time {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  flex-shrink: 0;
}


/* ─── Detail Info Cards (Env Vars, Git Info) ─── */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.detail-info-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  animation: fadeInUp 0.4s ease;
}

[data-theme="light"] .detail-info-section {
  background: rgba(0, 0, 0, 0.01);
}

.detail-info-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.detail-info-section h4 i {
  font-size: 15px;
  opacity: 0.6;
}

.env-var-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
}

[data-theme="light"] .env-var-row {
  background: rgba(0, 0, 0, 0.02);
}

.env-var-key {
  color: var(--accent-hover);
  font-weight: 500;
}

.env-var-value {
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.env-var-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

[data-theme="light"] .env-var-copy {
  background: rgba(0, 0, 0, 0.04);
}

.env-var-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

[data-theme="light"] .env-var-copy:hover {
  background: rgba(0, 0, 0, 0.08);
}

.git-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.git-info-row:last-child {
  border-bottom: none;
}

.git-info-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  min-width: 80px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
}

.git-info-value {
  color: var(--text-primary);
  font-size: 13px;
  word-break: break-all;
}

.git-info-value a {
  color: var(--accent-hover);
  text-decoration: none;
}

.git-info-value a:hover {
  text-decoration: underline;
}


/* ─── Delete Confirmation Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(25vh, 200px);
  animation: fadeIn 0.15s ease;
}

.modal-content {
  width: 420px;
  max-width: 90vw;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: paletteIn 0.15s ease;
}

[data-theme="light"] .modal-content {
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.modal-header {
  padding: 20px 24px 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--error);
  font-size: 18px;
}

.modal-body {
  padding: 16px 24px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
}


/* ─── Deploy Modal ─── */
.deploy-category {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.deploy-category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deploy-category-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0 0 12px;
}

.deploy-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  margin-top: 8px;
}

.deploy-option:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.deploy-option:first-child {
  margin-top: 0;
}

.deploy-option-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.deploy-option-text span {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
}


/* ─── Additional Animations ─── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s infinite;
}

.slide-in {
  animation: slideIn 0.3s ease;
}

.fade-in {
  animation: fadeIn 0.3s ease;
}


/* ─── Responsive for Charts Grid ─── */
@media (max-width: 900px) {
  .status-charts-grid {
    grid-template-columns: 1fr;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .status-charts-grid {
    grid-template-columns: 1fr;
  }
}
