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

:root {
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-400: #818cf8;
  --brand-glow: rgba(99, 102, 241, 0.35);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --surface-0: #09090b;
  --surface-1: #111113;
  --surface-2: #1c1c1f;
  --surface-3: #28282c;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--brand-glow);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transition: transform 0.2s ease;
}
.sidebar-brand {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.sidebar-brand .logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-glow);
}
.sidebar-brand h1 { font-size: 1.125rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.sidebar-brand span { color: var(--brand-400); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem; }
.nav-section { margin-bottom: 1.25rem; }
.nav-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); padding: 0 0.5rem; margin-bottom: 0.375rem;
}
.nav-link {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: all 0.15s ease;
}
.nav-link:hover { background: var(--surface-3); color: var(--text-primary); }
.nav-link.active { background: rgba(99, 102, 241, 0.15); color: var(--brand-400); }
.nav-link .icon { width: 18px; text-align: center; opacity: 0.7; }
.nav-tree { margin-left: 0.5rem; border-left: 1px solid var(--border); padding-left: 0.75rem; }
.nav-tree a { display: block; padding: 0.25rem 0.5rem; font-size: 12px; color: var(--text-muted); text-decoration: none; border-radius: 4px; }
.nav-tree a:hover { color: var(--brand-400); background: var(--surface-2); }
.nav-tree .app-status { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }

.main-wrap { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: rgba(17, 17, 19, 0.85);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.breadcrumb { font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-400); }
.breadcrumb .sep { margin: 0 0.375rem; opacity: 0.4; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.search-trigger, .icon-btn {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; cursor: pointer;
  transition: all 0.15s ease;
}
.search-trigger:hover, .icon-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.search-trigger kbd { font-size: 10px; padding: 2px 5px; background: var(--surface-3); border-radius: 4px; font-family: inherit; }
.alert-bell { position: relative; }
.alert-bell .badge-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 600; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.operator-console-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  text-decoration: none;
  margin-left: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.4);
  white-space: nowrap;
}

.operator-console-link:hover {
  background: rgba(245, 158, 11, 0.22);
}

.user-chip {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-600), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.user-email { font-size: 12px; color: var(--text-secondary); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { flex: 1; padding: 1.5rem; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-header { margin-bottom: 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 0.25rem; }

/* Cards */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--border-hover); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

/* Platform health banner (dashboard) */
.platform-health-banner {
  display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; margin-bottom: 1.25rem;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.platform-health-banner[data-status="healthy"] {
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 8%, var(--surface-1)), var(--surface-1));
}
.platform-health-banner[data-status="degraded"] {
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--warning) 8%, var(--surface-1)), var(--surface-1));
}
.platform-health-banner[data-status="unhealthy"] {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 8%, var(--surface-1)), var(--surface-1));
}
.platform-health-dot {
  width: 12px; height: 12px; border-radius: 999px; margin-top: 0.35rem; flex-shrink: 0;
}
.platform-health-banner[data-status="healthy"] .platform-health-dot { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent); }
.platform-health-banner[data-status="degraded"] .platform-health-dot { background: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 20%, transparent); }
.platform-health-banner[data-status="unhealthy"] .platform-health-dot { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 20%, transparent); }
.platform-health-banner[data-status="unknown"] .platform-health-dot { background: var(--text-muted); }
.platform-health-copy { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 0.25rem; }
.platform-health-copy strong { font-size: 15px; }
.platform-health-copy span { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.platform-health-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.health-chip {
  font-size: 11px; font-family: var(--font-mono); padding: 0.25rem 0.5rem;
  border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.health-chip--active { color: #93c5fd; border-color: rgba(59,130,246,0.25); background: rgba(59,130,246,0.08); }

.health-table-wrap { overflow-x: auto; }
.health-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.health-table td { vertical-align: middle; padding: 0.65rem 0.75rem; }
.health-issue-list { list-style: none; margin: 0; padding: 0; }
.health-issue-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 1rem; border-bottom: 1px solid var(--border);
}
.health-issue-item:last-child { border-bottom: none; }
.health-issue-item:hover { background: var(--surface-2); }
.health-issue-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.health-issue-fqdn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--brand-400); text-decoration: none;
}
.health-issue-fqdn:hover { text-decoration: underline; }
.timeline-step.state-degraded .dot { background: var(--warning); border-color: var(--warning); }
.badge-unhealthy, .badge-unknown { background: rgba(239,68,68,0.12); color: #fca5a5; }
.badge-sparse, .badge-stale, .badge-missing { background: rgba(245,158,11,0.12); color: #fde68a; }
.badge-degraded { background: rgba(245,158,11,0.15); color: #fcd34d; }
.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent, var(--brand-500)), transparent);
}
.stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 0.25rem; }
.stat-card .hint { font-size: 11px; color: var(--text-muted); margin-top: 0.25rem; }

.metrics-history-card { overflow: hidden; }
.metrics-history-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.metrics-history-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.range-pills { display: inline-flex; gap: 0.25rem; padding: 0.2rem; background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px; }
.range-pill {
  border: none; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 500;
  padding: 0.35rem 0.65rem; border-radius: 6px; cursor: pointer;
}
.range-pill:hover { color: var(--text-primary); background: var(--surface-3); }
.range-pill.active { background: var(--brand-500); color: #fff; }
.metrics-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .metrics-charts { grid-template-columns: 1fr; } }
.metrics-chart { background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; }
.metrics-chart-label { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 0.5rem; }
.metrics-chart-label strong { font-size: 15px; color: var(--text-primary); }
.metrics-sparkline { display: block; width: 100%; height: 100px; }
.metrics-chart-plot { position: relative; }
.metrics-chart-tooltip {
  position: absolute; transform: translate(-50%, -110%);
  pointer-events: none; z-index: 2;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.35rem 0.5rem;
  font-size: 11px; color: var(--text-primary); white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.metrics-collection-dl {
  display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem;
  margin: 0 0 1rem; padding: 0.75rem 1rem;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px;
}
.metrics-collection-dl dt { color: var(--text-muted); margin: 0; }
.metrics-collection-dl dd { margin: 0; color: var(--text-secondary); }
.server-log-pre {
  background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem; font-family: var(--font-mono); font-size: 11px;
  max-height: 320px; overflow-y: auto; color: var(--text-secondary); margin: 0;
  white-space: pre-wrap; word-break: break-word;
}
.metrics-history-foot { margin: 0.75rem 0 0; font-size: 12px; color: var(--text-muted); }
.metrics-collection-status {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.85rem 1rem; margin-bottom: 1rem;
  background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px;
}
.metrics-collection-status[data-status="healthy"] { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.metrics-collection-status[data-status="sparse"] { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); }
.metrics-collection-status[data-status="stale"],
.metrics-collection-status[data-status="missing"] { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.metrics-collection-dot {
  width: 10px; height: 10px; border-radius: 999px; margin-top: 0.35rem; flex-shrink: 0;
}
.metrics-collection-dot.badge-healthy { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.metrics-collection-dot.badge-warn { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 25%, transparent); }
.metrics-collection-dot.badge-degraded,
.metrics-collection-dot.badge-failed { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.metrics-collection-copy { display: flex; flex-direction: column; gap: 0.2rem; font-size: 12px; color: var(--text-secondary); }
.metrics-collection-copy strong { font-size: 13px; color: var(--text-primary); }
.stack-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stack-overall { font-size: 13px; color: var(--text-secondary); }
.stack-overall strong { color: var(--text-primary); }
.stack-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stack-table td:first-child { font-weight: 500; }
.stack-message { color: var(--text-secondary); font-size: 12px; max-width: 420px; }
.server-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 900px) { .server-overview-grid { grid-template-columns: 1fr; } }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.2rem 0.625rem; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-queued, .badge-cancelled { background: rgba(113,113,122,0.2); color: #a1a1aa; }
.badge-preparing, .badge-building, .badge-publishing, .badge-running, .badge-deploying { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-health_checking, .badge-degraded, .badge-warn { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-succeeded, .badge-ready, .badge-running-app, .badge-healthy, .badge-resolved { background: rgba(34,197,94,0.15); color: #86efac; }
.badge-failed, .badge-critical, .badge-open { background: rgba(239,68,68,0.15); color: #fca5a5; }
.badge-idle, .badge-pending { background: rgba(113,113,122,0.15); color: #d4d4d8; }
.badge-acknowledged { background: rgba(113,113,122,0.2); color: #a1a1aa; }
.badge-high { background: rgba(249,115,22,0.15); color: #fdba74; }
.badge-medium { background: rgba(245,158,11,0.12); color: #fde68a; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.15s ease; text-decoration: none;
}
.btn-primary { background: var(--brand-500); color: white; box-shadow: 0 2px 12px var(--brand-glow); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--surface-2); }
.btn-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.btn-sm { padding: 0.3rem 0.625rem; font-size: 12px; }

/* Deploy timeline */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.timeline-step {
  position: relative; padding: 0.5rem 0 0.5rem 1rem; cursor: pointer;
  border-radius: 8px; transition: background 0.15s;
}
.timeline-step:hover { background: var(--surface-2); }
.timeline-step .dot {
  position: absolute; left: -1.5rem; top: 0.75rem;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface-1);
  z-index: 1;
}
.timeline-step.state-succeeded .dot { background: var(--success); border-color: var(--success); }
.timeline-step.state-failed .dot { background: var(--danger); border-color: var(--danger); }
.timeline-step.state-stale .dot { background: var(--text-muted); border-color: var(--text-muted); opacity: 0.65; }
.timeline-step.state-stale { opacity: 0.85; }
.timeline-step.state-running .dot { background: var(--brand-500); border-color: var(--brand-500); animation: pulse 1.5s infinite; }
.timeline-step.state-skipped .dot { background: var(--text-muted); border-color: var(--text-muted); }
.timeline-step.state-pending .dot { background: var(--surface-3); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 var(--brand-glow); } 50% { box-shadow: 0 0 0 6px transparent; } }
.timeline-step .step-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.timeline-step .step-name { font-weight: 500; font-size: 13px; }
.timeline-step .step-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem;
  font-size: 10px; color: var(--text-muted); font-family: var(--font-mono);
  margin-top: 0.2rem; width: 100%;
}
.timeline-step .step-duration { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.timeline-step .step-log {
  display: none; margin-top: 0.5rem; padding: 0.75rem;
  background: var(--surface-0); border: 1px solid var(--border);
  border-radius: 8px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-secondary); max-height: 160px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; line-height: 1.45;
}
.timeline-step.expanded .step-log { display: block; }

/* Latest deploy snapshot (app overview) */
.deploy-snapshot { overflow: hidden; }
.deploy-snapshot-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99,102,241,0.06) 0%, transparent 100%);
}
.deploy-snapshot-label {
  margin: 0 0 0.35rem; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.deploy-snapshot-title {
  margin: 0; display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap;
  font-size: 1rem; font-weight: 600;
}
.deploy-snapshot-title code { font-size: 12px; color: var(--brand-400); }
.deploy-snapshot-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0.5rem 0 0;
  font-size: 12px; color: var(--text-secondary);
}
.deploy-snapshot-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.deploy-snapshot-meta .meta-label { color: var(--text-muted); }
.deploy-snapshot-meta .meta-value { font-family: var(--font-mono); font-size: 11px; }
.deploy-snapshot-body { padding: 1rem 1.25rem 1.25rem; }
.deploy-snapshot-body .card { box-shadow: none; }
.deploy-snapshot-logs { padding: 0 1.25rem 1.25rem; }
.deploy-snapshot-logs .card-header { padding-top: 0; }

/* Log panel */
.log-panel {
  background: #0a0a0c; border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.45;
  padding: 1rem; height: 320px; overflow-y: auto; color: #94a3b8;
  white-space: pre-wrap; word-break: break-word;
}
.log-panel.log-panel--structured {
  white-space: normal; padding: 0; display: flex; flex-direction: column;
}
.log-panel.log-panel--container {
  height: auto; max-height: 320px; min-height: 8rem;
}
.log-line {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.3rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.035);
}
.log-line:last-child { border-bottom: none; }
.log-line:hover { background: rgba(255,255,255,0.02); }
.log-line-ts {
  flex: 0 0 4.25rem; font-size: 10px; color: #64748b;
  font-variant-numeric: tabular-nums; padding-top: 1px; user-select: none;
}
.log-line-body {
  flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; color: #cbd5e1;
}
.log-line--info .log-line-body { color: #7dd3fc; }
.log-line--ok .log-line-body { color: #86efac; }
.log-line--err .log-line-body { color: #fca5a5; }
.log-line--muted .log-line-body { color: var(--text-muted); font-style: italic; }
.log-panel .line-info { color: var(--info); }
.log-panel .line-err { color: var(--danger); }
.log-panel .line-ok { color: var(--success); }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tab {
  padding: 0.625rem 1rem; font-size: 13px; font-weight: 500;
  color: var(--text-muted); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--brand-400); border-bottom-color: var(--brand-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Progress bars */
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 0.5rem; }
.progress-bar { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.progress-bar.ok { background: linear-gradient(90deg, var(--success), #4ade80); }
.progress-bar.warn { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-bar.danger { background: linear-gradient(90deg, var(--danger), #f87171); }

/* Routes */
.route-list { display: flex; flex-direction: column; gap: 1rem; }
.route-card { margin-bottom: 0; }
.route-card-header { align-items: flex-start; gap: 1rem; }
.route-card-title { min-width: 0; }
.route-fqdn {
  font-size: 1.05rem; font-weight: 600; font-family: var(--font-mono);
  color: var(--brand-300); word-break: break-all;
}
.route-card-meta { font-size: 12px; color: var(--text-muted); margin: 0.35rem 0 0; }
.route-tag {
  display: inline-block; margin-left: 0.5rem; padding: 0.15rem 0.5rem;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--success); background: rgba(34,197,94,0.12); border-radius: 999px; vertical-align: middle;
}
.route-card-dl { padding: 0 1.25rem 1.25rem; }
.route-url-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.route-public-url { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); }
.route-url-actions { display: inline-flex; gap: 0.35rem; }
.route-muted { color: var(--text-muted); font-size: 12px; }
.route-cname-box { margin: 0 1.25rem 1.25rem; }
.route-cname-label { font-size: 11px; color: var(--text-muted); margin-bottom: 0.375rem; }
.route-cname-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.route-cname-hint { margin: 0.5rem 0 0; font-size: 12px; }
.route-form-card { padding: 1.5rem; max-width: 560px; }
.route-host-type { border: 0; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.route-host-type legend { margin-bottom: 0.5rem; padding: 0; }
.sslip-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-mono); font-size: 13px;
}
.route-form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* Route map (detail / failover) */
.route-map { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.route-node {
  background: var(--surface-2); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; text-align: center;
}
.route-node.active { border-color: var(--success); box-shadow: 0 0 20px rgba(34,197,94,0.15); }
.route-node.candidate { border-style: dashed; border-color: var(--brand-400); }
.route-arrow { font-size: 1.5rem; color: var(--text-muted); }
.cname-box {
  background: rgba(99,102,241,0.08); border: 1px dashed var(--brand-500);
  border-radius: var(--radius); padding: 1rem; margin-top: 1rem;
  font-family: var(--font-mono); font-size: 12px;
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 0.625rem 0.75rem; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--surface-2); }
.data-table tr.clickable-row { cursor: pointer; }

/* Empty state */
.empty-state {
  text-align: center; padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1.125rem; margin: 0 0 0.5rem; }
.empty-state p { color: var(--text-muted); font-size: 13px; margin: 0 0 1.25rem; }

/* Command palette */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh;
}
.overlay.hidden { display: none; }
.palette {
  width: 100%; max-width: 560px; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.palette input {
  width: 100%; padding: 1rem 1.25rem; background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text-primary); font-size: 15px; outline: none;
}
.palette-results { max-height: 320px; overflow-y: auto; padding: 0.5rem; }
.palette-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: 8px; cursor: pointer;
  color: var(--text-secondary); text-decoration: none; font-size: 13px;
}
.palette-item:hover, .palette-item.selected { background: var(--surface-2); color: var(--text-primary); }
.palette-section { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 0.5rem 0.75rem 0.25rem; }

/* Helper panel */
.brand-logo-img {
  display: block;
  object-fit: contain;
}
.helper-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-2);
  border: none; padding: 0;
  cursor: pointer; box-shadow: var(--shadow-glow);
  transition: transform 0.2s ease;
  overflow: hidden;
}
.helper-fab:hover { transform: scale(1.08); }
.helper-fab-avatar { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.joel-avatar-img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center top;
  flex-shrink: 0;
}
.joel-avatar-lg { width: 56px; height: 56px; }
.ops-chat-title-row { display: flex; align-items: center; gap: 1rem; }
.joel-header { gap: 0.75rem; }
.joel-header-text { display: flex; flex-direction: column; gap: 0.125rem; }
.joel-title { font-size: 1rem; letter-spacing: -0.02em; }
.joel-subtitle { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.joel-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--brand-400); margin-bottom: 0.35rem;
}
.joel-welcome { border-color: rgba(99, 102, 241, 0.35); }
.joel-typing { color: var(--text-muted); font-style: italic; }
.joel-proposal-card {
  margin-top: 0.5rem; padding: 0.75rem 1rem; border-radius: 10px;
  background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 13px;
}
.joel-proposal-card h4 { margin: 0 0 0.35rem; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-400); }
.joel-proposal-actions { display: flex; gap: 0.5rem; margin-top: 0.65rem; flex-wrap: wrap; }
.joel-tier { font-size: 10px; padding: 0.15rem 0.4rem; border-radius: 4px; background: var(--surface-3); color: var(--text-muted); }
.ops-chat-panel { padding: 0; display: flex; flex-direction: column; height: min(70vh, 640px); }
.ops-chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ops-chat-empty { color: var(--text-muted); text-align: center; padding: 2rem 1rem; }

.joel-nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.1rem; height: 1.1rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), #7c3aed);
  color: #fff; font-size: 10px; font-weight: 700;
}
.joel-nav-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  object-fit: cover; object-position: center top; flex-shrink: 0;
}
.joel-thread-list { list-style: none; margin: 0; padding: 0; }
.joel-thread-item { border-bottom: 1px solid var(--border); }
.joel-thread-item:last-child { border-bottom: none; }
.joel-thread-link {
  display: block; padding: 1rem 1.25rem; text-decoration: none; color: inherit;
  transition: background 0.15s ease;
}
.joel-thread-link:hover { background: rgba(255,255,255,0.03); }
.joel-thread-meta {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 0.35rem; font-size: 12px; color: var(--text-muted);
}
.joel-thread-scope { color: var(--text-secondary); }
.joel-thread-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.joel-thread-title { display: block; font-size: 15px; margin-bottom: 0.25rem; }
.joel-thread-preview {
  margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.helper-drawer {
  position: fixed; top: 0; right: 0; width: 400px; max-width: 100vw; height: 100%;
  background: var(--surface-1); border-left: 1px solid var(--border);
  z-index: 90; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.25s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
.helper-drawer.open { transform: translateX(0); }
.helper-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.helper-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.msg { max-width: 90%; padding: 0.625rem 0.875rem; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.msg-user { align-self: flex-end; background: var(--brand-500); color: white; border-bottom-right-radius: 4px; }
.msg-assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.helper-input-bar { padding: 1rem; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; }
.helper-input-bar textarea {
  flex: 1; resize: none; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.625rem; color: var(--text-primary); font-family: inherit; font-size: 13px;
}

/* Login */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--surface-0);
  background-image: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,0.25), transparent),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(124,58,237,0.15), transparent);
}
.login-card {
  width: 100%; max-width: 400px; padding: 2rem;
  background: rgba(17,17,19,0.8); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.login-callout {
  font-size: 13px; line-height: 1.55; padding: 0.75rem 0.875rem;
  border-radius: 8px; margin-bottom: 1.25rem;
}
.login-callout-info {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--text-secondary);
}
.login-callout-info strong { color: var(--text-primary); }
.login-callout-info a { color: var(--brand-400); font-weight: 500; }
.login-callout code { font-family: var(--font-mono); font-size: 12px; }
.login-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 0.375rem; }
.form-input {
  width: 100%; padding: 0.625rem 0.875rem; background: var(--surface-0);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary);
  font-size: 14px; transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-glow); }
.form-textarea { resize: vertical; min-height: 120px; font-family: var(--font-mono); font-size: 12px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin: 0.375rem 0 0; }
.form-hint code { font-size: 11px; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; min-width: 0; }
.password-input-wrap { display: flex; gap: 0.5rem; align-items: stretch; }
.password-input-wrap .form-input { flex: 1; min-width: 0; }
.password-input-wrap .btn { flex-shrink: 0; align-self: stretch; }
.form-check { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.form-check input { accent-color: var(--brand-500); }
.alerts-filter-form {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.25rem;
}
.bulk-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.bulk-bar.hidden { display: none; }
.form-layout { align-items: start; }
.hidden { display: none !important; }
.nav-add {
  font-size: 14px; font-weight: 600; color: var(--brand-400); text-decoration: none;
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.nav-add:hover { background: var(--surface-3); }
.alert { padding: 0.75rem 1rem; border-radius: 8px; font-size: 13px; margin-bottom: 1rem; }
.alert-danger, .alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.flash-messages { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.flash-messages:empty { display: none; margin: 0; }
.flash-toast { padding: 0.75rem 1rem; border-radius: 8px; font-size: 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; animation: flash-in 0.2s ease; }
.flash-toast--error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.flash-toast--success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.35); color: #86efac; }
.flash-toast--warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35); color: #fcd34d; }
.flash-toast-close { background: none; border: none; color: inherit; opacity: 0.7; cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.next-step-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-bottom: 1.25rem; border-radius: var(--radius); border: 1px solid rgba(99,102,241,0.35); background: rgba(99,102,241,0.08); }
.next-step-banner-copy strong { display: block; color: var(--text-primary); font-size: 14px; }
.next-step-banner-copy p { margin: 0.35rem 0 0; font-size: 13px; color: var(--text-muted); }
.next-step-banner-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.next-step-banner.is-dismissed { display: none; }
.deploy-prereq-card { margin-bottom: 1.25rem; padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid rgba(245,158,11,0.35); background: rgba(245,158,11,0.08); }
.deploy-prereq-card strong { display: block; margin-bottom: 0.35rem; }
.deploy-prereq-card p { margin: 0 0 0.75rem; font-size: 13px; color: var(--text-muted); }
.deploy-prereq-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.help-steps { margin: 0; padding-left: 1.25rem; font-size: 13px; color: var(--text-secondary); }
.help-steps li { margin-bottom: 0.5rem; }
.detail-dl { display: grid; grid-template-columns: 120px 1fr; gap: 0.5rem 1rem; margin: 0; font-size: 13px; }
.detail-dl dt { color: var(--text-muted); margin: 0; }
.detail-dl dd { margin: 0; color: var(--text-primary); }
.env-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.env-form .form-group { margin: 0; flex: 1; min-width: 140px; }
.onboarding-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; counter-reset: step; }
.onboarding-steps li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem 1rem; align-items: center; padding: 0.75rem 1rem; background: var(--surface-0); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.onboarding-steps li::before { content: counter(step); counter-increment: step; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; color: var(--text-muted); }
.onboarding-steps li.done::before { background: rgba(34,197,94,0.2); color: var(--success); content: '✓'; }
.onboarding-steps li strong { display: block; color: var(--text-primary); }
.onboarding-steps li span { grid-column: 2; color: var(--text-muted); font-size: 12px; }
.onboarding-steps li .btn { grid-column: 3; grid-row: 1 / span 2; }

.cloud-partners-panel { margin-bottom: 1.25rem; padding: 1.25rem; }
.cloud-partners-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cloud-partners-footnote { margin: 1rem 0 0; }
.cloud-partners-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
.cloud-partner-card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.cloud-partner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}
.cloud-partner-card--vultr:hover { border-color: rgba(0, 123, 252, 0.45); box-shadow: 0 12px 32px rgba(0, 123, 252, 0.12); }
.cloud-partner-card--blue-lobster:hover { border-color: rgba(34, 211, 238, 0.4); box-shadow: 0 12px 32px rgba(34, 211, 238, 0.1); }
.cloud-partner-card > p,
.cloud-partner-card > .btn,
.cloud-partner-card > .marketing-partner-perks {
  margin-left: 1.125rem;
  margin-right: 1.125rem;
}
.cloud-partner-card > p { margin-top: 0; margin-bottom: 0; flex: 1; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.cloud-partner-card > .marketing-partner-perks { margin-bottom: 0; }
.cloud-partner-card > .btn,
.cloud-partner-card > .marketing-partner-link { align-self: flex-start; margin-top: auto; margin-bottom: 1.125rem; }
.partner-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  margin-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.partner-brand-bar--vultr {
  background: linear-gradient(135deg, rgba(0, 123, 252, 0.16) 0%, rgba(81, 185, 255, 0.06) 55%, transparent 100%);
}
.partner-brand-bar--blue-lobster {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(59, 130, 246, 0.08) 50%, transparent 100%);
}
.partner-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.partner-logo-link:hover { opacity: 0.92; }
.partner-logo-lockup { gap: 0.625rem; }
.partner-logo--vultr {
  display: block;
  width: auto;
  height: 28px;
  max-width: 132px;
}
.partner-logo-icon--blue-lobster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.partner-logo--blue-lobster {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.partner-logo-wordmark--blue-lobster {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 45%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.cloud-partner-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cloud-partner-tag--vultr {
  color: #51b9ff;
  border: 1px solid rgba(0, 123, 252, 0.35);
  background: rgba(0, 123, 252, 0.12);
}
.cloud-partner-tag--blue-lobster {
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.1);
}
.empty-state-compact { padding: 1.5rem 1rem; text-align: center; }
@media (max-width: 720px) {
  .cloud-partners-panel-head { flex-direction: column; align-items: stretch; }
  .cloud-partners-grid { grid-template-columns: 1fr; }
}

.decom-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .decom-layout { grid-template-columns: 1fr; } }
.decom-steps-card { position: sticky; top: 1rem; }
.decom-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.decom-step { display: flex; align-items: center; gap: 0.625rem; font-size: 13px; color: var(--text-muted); }
.decom-step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--border); flex-shrink: 0; }
.decom-step.state-done { color: var(--success); }
.decom-step.state-done .decom-step-dot { background: var(--success); border-color: var(--success); }
.decom-step.state-action .decom-step-dot { background: var(--warning); border-color: var(--warning); box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }
.decom-step.state-action { color: var(--text-primary); font-weight: 500; }
.decom-ready { font-size: 12px; color: var(--success); margin: 1rem 0 0; }
.decom-blocked { font-size: 12px; color: var(--warning); margin: 1rem 0 0; }
.decom-blockers { display: flex; flex-direction: column; gap: 1rem; }
.decom-blocker { padding: 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-0); }
.decom-blocker.severity-error { border-color: rgba(239,68,68,0.35); }
.decom-blocker.severity-warning { border-color: rgba(245,158,11,0.35); }
.decom-blocker.severity-info { border-color: rgba(59,130,246,0.25); }
.decom-blocker-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.decom-count { font-size: 11px; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); }
.decom-blocker-detail { margin: 0 0 0.75rem; font-size: 12px; color: var(--text-muted); }
.decom-item-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.decom-item-list li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 13px; padding: 0.35rem 0; border-top: 1px solid var(--border); }
.decom-item-label { font-family: var(--font-mono); font-size: 12px; }
.decom-item-meta { color: var(--text-muted); font-size: 12px; }
.badge-muted { background: var(--surface-3); color: var(--text-muted); }
.decom-danger-zone { border-color: rgba(239,68,68,0.25); }

/* Project detail */
.tab-intro { font-size: 13px; color: var(--text-muted); margin: 0 0 1.25rem; line-height: 1.5; }
.tab-intro a { color: var(--brand-400); }
.deploy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.deploy-env-card { padding: 1.25rem; display: flex; flex-direction: column; }
.deploy-env-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.deploy-env-name { margin: 0; font-size: 15px; font-weight: 600; text-transform: capitalize; }
.deploy-env-id { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.deploy-env-count { font-size: 11px; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); white-space: nowrap; }
.deploy-app-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; flex: 1; }
.deploy-app-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; border-top: 1px solid var(--border); }
.deploy-app-row:first-child { border-top: none; padding-top: 0; }
.deploy-app-link { flex: 1; font-weight: 500; font-size: 13px; color: var(--text-primary); text-decoration: none; }
.deploy-app-link:hover { color: var(--brand-400); }
.deploy-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius); }
.deploy-empty p { margin: 0 0 0.75rem; font-size: 13px; color: var(--text-muted); }
.env-pill { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.5rem; border-radius: 6px; background: var(--surface-3); color: var(--text-secondary); }
.danger-zone { padding: 1.25rem; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }
.tabs .tab { text-decoration: none; display: inline-block; }

.grid-2 { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; }

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 90; }
.sidebar-backdrop.open { display: block; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-primary); cursor: pointer; font-size: 18px; flex-shrink: 0; }
.topbar-menu-wrap { position: relative; }
.topbar-menu { display: none; position: absolute; right: 0; top: calc(100% + 0.35rem); min-width: 160px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 0.35rem; box-shadow: var(--shadow-lg); z-index: 50; }
.topbar-menu.open { display: flex; flex-direction: column; gap: 0.15rem; }
.topbar-menu .btn { justify-content: flex-start; width: 100%; }
.topbar-actions-compact { display: none; }
.search-trigger kbd.search-kbd-mac { display: inline; }
.search-trigger kbd.search-kbd-win { display: none; }

@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 768px) {
  .topbar-right > .btn-ghost,
  .topbar-right > .user-chip,
  .topbar-right > a[href='/logout'] { display: none; }
  .topbar-actions-compact { display: block; }
  .user-email { display: none; }
  .search-trigger span.search-label { display: none; }
}
@media (max-width: 1024px) {
  body.platform-windows .search-trigger kbd.search-kbd-mac { display: none; }
  body.platform-windows .search-trigger kbd.search-kbd-win { display: inline; }
}

.activity-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.marketing-code-block {
  display: block;
  margin: 0.75rem 0 0;
  padding: 0.875rem 1rem;
  background: var(--surface-2, #0f1419);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  color: var(--text, #e6edf3);
}
