/* ==========================================================================
   AHEAD WORKSHOP OS v2.0 — DESIGN SYSTEM
   Crafted with: Apple HIG (Liquid Glass), Impeccable v4.8, shadcn/ui, Bklit UI, Kokonut UI
   ========================================================================== */

:root,
html[data-theme="dark"] {
  --bg-base: #060911;
  --bg-elevated: #0b1120;
  --glass-surface: rgba(15, 23, 42, 0.68);
  --glass-surface-hover: rgba(22, 33, 58, 0.82);
  --glass-strong: rgba(12, 19, 35, 0.88);
  --glass-border: rgba(148, 163, 184, 0.14);
  --glass-border-highlight: rgba(56, 189, 248, 0.42);
  --glass-shine: inset 0 1px 0 0 rgba(255, 255, 255, 0.09);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-pink: #f472b6;
  --accent-purple: #a855f7;
  --shadow-glass: 0 18px 42px -12px rgba(2, 6, 23, 0.65);
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="light"] {
  --bg-base: #f1f5f9;
  --bg-elevated: #ffffff;
  --glass-surface: rgba(255, 255, 255, 0.78);
  --glass-surface-hover: rgba(255, 255, 255, 0.94);
  --glass-strong: rgba(255, 255, 255, 0.96);
  --glass-border: rgba(15, 23, 42, 0.1);
  --glass-border-highlight: rgba(2, 132, 199, 0.45);
  --glass-shine: inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-pink: #db2777;
  --accent-purple: #7c3aed;
  --shadow-glass: 0 14px 34px -10px rgba(15, 23, 42, 0.09);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
}

code, kbd, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* AMBIENT BACKGROUND */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.26;
}

html[data-theme="light"] .ambient-orb {
  opacity: 0.14;
}

.orb-1 {
  width: 560px;
  height: 560px;
  top: -160px;
  left: 16%;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
}

.orb-2 {
  width: 520px;
  height: 520px;
  top: 28%;
  right: -120px;
  background: radial-gradient(circle, #818cf8, transparent 70%);
}

.orb-3 {
  width: 480px;
  height: 480px;
  bottom: -140px;
  left: 35%;
  background: radial-gradient(circle, #10b981, transparent 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 25%, black 35%, transparent 85%);
}

/* APP SHELL */
.app-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  background: var(--glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  padding: 6px 8px;
}

.brand-glyph {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 0.96rem;
  letter-spacing: 0.03em;
  font-weight: 800;
}

.brand-text span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.nav-group-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 10px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover {
  background: var(--glass-surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.08));
  color: var(--text-primary);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: var(--glass-shine);
}

.nav-icon {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  width: 18px;
  text-align: center;
}

.nav-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link kbd {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
}

.sidebar-stack-card {
  padding: 13px;
  border-radius: 14px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shine);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.stack-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stack-pills span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.11);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.sidebar-stack-card small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: 64px;
  padding: 0 28px;
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.crumb-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.crumb-sep {
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.cmd-trigger:hover {
  border-color: var(--glass-border-highlight);
  color: var(--text-primary);
}

.cmd-trigger kbd {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.16);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-dot.green {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.72; }
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.16s ease;
}

.icon-btn:hover {
  border-color: var(--glass-border-highlight);
  transform: translateY(-1px);
}

/* CONTENT WRAPPER */
.content {
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px 28px 64px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* HERO SECTION */
.section-hero {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-copy {
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.eyebrow-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.eyebrow-chip.accent {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.34);
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 55%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.62;
}

.hero-lead code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  font-size: 0.85em;
}

.hero-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary, .btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  box-shadow: 0 10px 25px -6px rgba(14, 165, 233, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -6px rgba(14, 165, 233, 0.6);
}

.btn-glass {
  background: var(--glass-surface);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shine);
}

.btn-glass:hover {
  border-color: var(--glass-border-highlight);
  transform: translateY(-2px);
}

/* KPI BENTO GRID */
.kpi-bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1360px) {
  .kpi-bento-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kpi-bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), var(--glass-shine);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-card.highlight {
  border-color: rgba(56, 189, 248, 0.38);
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.12), var(--glass-surface));
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.kpi-tag.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.kpi-tag.cyan { background: rgba(56, 189, 248, 0.16); color: #38bdf8; }
.kpi-tag.blue { background: rgba(99, 102, 241, 0.16); color: #818cf8; }
.kpi-tag.purple { background: rgba(168, 85, 247, 0.16); color: #c084fc; }
.kpi-tag.amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }

.kpi-main-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-val {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kpi-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.kpi-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.kpi-bar-fill.emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.kpi-bar-fill.cyan { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.kpi-bar-fill.blue { background: linear-gradient(90deg, #6366f1, #38bdf8); }
.kpi-bar-fill.purple { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.kpi-bar-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* STUDIO ANALYTICS GRID (Rings + Bklit Chart + VPS Gauges) */
.studio-analytics-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 330px;
  gap: 16px;
}

@media (max-width: 1360px) {
  .studio-analytics-grid { grid-template-columns: 1fr; }
}

.glass-panel {
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--glass-surface);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), var(--glass-shine);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.panel-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 3px;
}

.panel-head h3 {
  font-size: 1rem;
  font-weight: 700;
}

.badge-soft {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.badge-soft.green {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
}

/* KOKONUT APPLE ACTIVITY RINGS */
.rings-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.rings-svg-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
}

.activity-rings-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(148, 163, 184, 0.12);
  stroke-width: 11;
}

.ring-progress {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.35));
  transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.rings-center-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.rings-center-label strong {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
}

.rings-center-label small {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.rings-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ring-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
}

.ring-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ring-dot.cyan { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.ring-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.ring-dot.pink { background: #f472b6; box-shadow: 0 0 8px #f472b6; }

.ring-legend-item strong {
  display: block;
  font-size: 0.78rem;
}

.ring-legend-item small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* BKLIT STUDIO BAR CHART */
.chart-mode-tabs {
  display: inline-flex;
  background: rgba(148, 163, 184, 0.1);
  padding: 3px;
  border-radius: 9px;
  gap: 3px;
}

.chart-tab {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-tab.active {
  background: var(--accent-cyan);
  color: #060911;
  font-weight: 700;
}

.bklit-chart-stage {
  flex: 1;
  min-height: 225px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 18px 8px 6px;
  border-bottom: 1px dashed var(--glass-border);
  background-image: linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 100% 45px;
}

.bklit-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
  position: relative;
}

.bklit-bar-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.bklit-bar-pillar {
  width: 100%;
  max-width: 34px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #38bdf8 0%, rgba(99, 102, 241, 0.35) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.22);
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.16s ease, filter 0.16s ease;
}

.bklit-bar-col:hover .bklit-bar-pillar {
  transform: scaleX(1.08);
  filter: brightness(1.2);
}

.bklit-bar-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* VPS GAUGES */
.gauges-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  flex: 1;
}

.gauge-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gauge-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.gauge-meta strong {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.gauge-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.gauge-fill.cyan { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.gauge-fill.purple { background: linear-gradient(90deg, #6366f1, #a855f7); }
.gauge-fill.emerald { background: linear-gradient(90deg, #10b981, #34d399); }

.vps-runtime-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--glass-border);
}

.vps-runtime-chips span {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}

/* SECTION BLOCKS */
.section-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 4px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  min-width: 310px;
}

.search-input-wrap input {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  width: 100%;
  outline: none;
}

/* SKILL RADAR BAR */
.skill-radar-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shine);
}

.radar-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.radar-pill {
  border: 1px solid var(--glass-border);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.radar-pill:hover {
  border-color: var(--glass-border-highlight);
  color: var(--text-primary);
}

.radar-pill.active {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.38);
}

/* GROUP TABS */
.group-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-tab {
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.group-tab.active {
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.45);
}

.matrix-counter {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* AGENTS BENTO GRID */
.agents-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1260px) {
  .agents-bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .agents-bento-grid { grid-template-columns: 1fr; }
}

.agent-bento-card {
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), var(--glass-shine);
  display: flex;
  flex-direction: column;
  gap: 13px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.agent-bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-highlight);
}

.agent-bento-card.skill-matched {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 16px 38px rgba(14, 165, 233, 0.22);
}

.agent-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agent-code-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.agent-status-badge.working {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.agent-status-badge.recent {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.agent-status-badge.idle {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.agent-title-block h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.agent-title-block p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.42;
}

.agent-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}

.meta-chip.asana {
  background: rgba(244, 114, 182, 0.16);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.meta-chip.skills-cnt {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  font-weight: 700;
}

.agent-skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid var(--glass-border);
}

html[data-theme="light"] .agent-skills-cloud {
  background: rgba(241, 245, 249, 0.8);
}

.skill-mini-chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.skill-mini-chip.featured {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.28);
}

.skill-mini-chip.active-hit {
  background: #38bdf8;
  color: #060911;
  font-weight: 800;
}

.agent-live-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  font-size: 0.77rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.agent-live-box strong {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

.agent-live-box p {
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agent-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.inspect-btn-inline {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* PIPELINE SECTION */
.pipeline-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px) {
  .pipeline-steps-grid { grid-template-columns: 1fr; }
}

.pipeline-step-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shine);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pipeline-step-card:hover {
  border-color: var(--glass-border-highlight);
  transform: translateY(-2px);
}

.pipe-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipe-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.14);
}

/* SANDBOXES SHOWCASE GRID */
.sandboxes-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1180px) {
  .sandboxes-showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sandboxes-showcase-grid { grid-template-columns: 1fr; }
}

.sandbox-card {
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass), var(--glass-shine);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sandbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sandbox-url-box {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.09);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.22);
  word-break: break-all;
}

.sandbox-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.sbx-btn {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.sbx-btn.primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  border-color: transparent;
}

/* KANBAN BOARD */
.kanban-filter-pills, .stream-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.k-pill, .s-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.k-pill.active, .s-pill.active {
  background: var(--accent-cyan);
  color: #060911;
  border-color: transparent;
  font-weight: 700;
}

.kanban-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 1260px) {
  .kanban-board-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
}
@media (max-width: 720px) {
  .kanban-board-grid { grid-template-columns: 1fr; }
}

.kanban-col {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.84rem;
}

.k-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.k-dot.slate { background: #94a3b8; }
.k-dot.cyan { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.k-dot.amber { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.k-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }

.k-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.kanban-cards-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.k-card {
  padding: 12px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: grab;
}

html[data-theme="light"] .k-card {
  background: #ffffff;
}

.k-card-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.k-card-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* SERVICES RHYTHM GRID */
.services-rhythm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1200px) {
  .services-rhythm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .services-rhythm-grid { grid-template-columns: 1fr; }
}

.srv-rhythm-card {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.srv-rhythm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* LIVE STREAM LIST */
.live-stream-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-row {
  display: grid;
  grid-template-columns: 82px 190px 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 15px;
  border-radius: 11px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .stream-row { grid-template-columns: 75px 1fr; }
}

/* DRAWER & MODALS */
.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop[hidden], .modal-backdrop[hidden] {
  display: none !important;
}

.agent-drawer {
  width: min(620px, 100vw);
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--glass-border);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
}

.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  color: var(--text-primary);
  cursor: pointer;
}

.modal-backdrop {
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.preview-modal-card {
  width: min(1240px, 96vw);
  height: min(820px, 88vh);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-modal-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-Modal-title, .preview-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-ext-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-cyan);
  text-decoration: none;
  margin-left: 10px;
}

.preview-iframe-wrap {
  flex: 1;
  background: #fff;
}

.preview-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* COMMAND PALETTE */
.cmd-palette-card {
  width: min(680px, 94vw);
  max-height: 76vh;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border-highlight);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border);
}

.cmd-input-row input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.cmd-results-list {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cmd-item {
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.cmd-item:hover {
  background: var(--glass-surface-hover);
}

.app-footer {
  padding: 22px 28px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 980px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
