/* ==========================================================================
   P1RES.DEV — COMMAND OS ULTRA HUD DESIGN SYSTEM & MANAGERIAL SUITE
   Dark Premium, Awwwards Grade, Multi-tab Views, Server Telemetry & AI Hub
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Surfaces */
  --bg-main: #050814;
  --bg-sidebar: #070c1b;
  --bg-card: #0b1224;
  --bg-card-hover: #0f1830;
  --bg-input: #090f21;
  --bg-hero: linear-gradient(135deg, #0c142c 0%, #060a18 100%);
  --surface-elevated: #0f1a36;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(120, 150, 220, 0.12);
  --border-active: rgba(62, 124, 255, 0.45);
  --border-cyan: rgba(6, 182, 212, 0.35);

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Space Grotesk', var(--font-sans);

  /* Accents */
  --primary-blue: #2563eb;
  --primary-purple: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-emerald: #059669;
  --accent-amber: #f59e0b;
  --accent-pink: #ec4899;
  --accent-rose: #f43f5e;
  --accent-orange: #f97316;

  /* UI Metrics */
  --sidebar-w: 245px;
  --topbar-h: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Atmosphere */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.12), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(124, 58, 237, 0.08), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.02), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* App Shell */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
}

.sidebar-brand {
  height: var(--topbar-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-code-symbol {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: #38bdf8;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-dot {
  color: #38bdf8;
}

.sidebar-menu {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.menu-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 10px 12px 4px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s ease;
  position: relative;
  cursor: pointer;
}

.menu-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.menu-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.2);
}

.menu-link svg {
  width: 17px;
  height: 17px;
  opacity: 0.8;
  flex-shrink: 0;
}

.menu-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.menu-badge.cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
}

.sidebar-bottom {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}

.plan-card {
  background: rgba(11, 17, 34, 0.8);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-gear {
  color: var(--text-muted);
  cursor: pointer;
}

.plan-usage-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.plan-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.plan-progress-bar {
  height: 100%;
  width: 78%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

.plan-link {
  font-size: 11px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Main Content */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  height: var(--topbar-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(5, 8, 20, 0.88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.search-box-wrapper {
  position: relative;
  width: 320px;
}

.search-box {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 36px 8px 34px;
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 14px;
  height: 14px;
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--border-active);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-profile-badge:hover {
  border-color: var(--border-active);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
}

/* Dashboard Canvas */
.dashboard-canvas {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Tab Views Switcher */
.tab-view-content {
  display: none;
  flex-direction: column;
  gap: 24px;
}
.tab-view-content.active {
  display: flex;
}

/* Top Two Columns Grid */
.dashboard-top-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

@media (max-width: 1200px) {
  .dashboard-top-grid {
    grid-template-columns: 1fr;
  }
}

/* Hero Banner */
.command-hero-card {
  background: var(--bg-hero);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.hero-globe-decoration {
  position: absolute;
  right: -20px;
  top: -20px;
  bottom: -20px;
  width: 360px;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.15) 40%, transparent 70%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.globe-svg {
  width: 300px;
  height: 300px;
  opacity: 0.7;
  animation: rotate-globe 40s linear infinite;
}

@keyframes rotate-globe {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.hero-welcome {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.hero-welcome strong {
  color: #fff;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 12px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.btn-hero-primary {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border: 1px solid rgba(130, 150, 255, 0.4);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.35);
}

.btn-hero-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.5);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

.hero-status-pills {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 2;
}

.status-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.status-stat-label {
  color: var(--text-muted);
}

.status-stat-val {
  color: #fff;
  font-weight: 600;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 4px;
}

.green-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Right Stats Column */
.right-stats-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-box {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.panel-link-action {
  font-size: 11.5px;
  color: #38bdf8;
  text-decoration: none;
  cursor: pointer;
}

.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-icon-square {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.metric-icon-square.purple {
  background: rgba(124, 58, 237, 0.15);
  color: #a855f7;
  border: 1px solid rgba(124, 58, 237, 0.3);
}
.metric-icon-square.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.metric-icon-square.blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.metric-icon-square.red {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.metric-data-group {
  display: flex;
  flex-direction: column;
}

.metric-lbl {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.metric-val-trend {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-number {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
}

.metric-trend {
  font-size: 10.5px;
  font-weight: 600;
}
.metric-trend.up { color: #10b981; }
.metric-trend.down { color: #10b981; }

.sparkline-svg {
  width: 70px;
  height: 24px;
}

/* Services List */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.service-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-primary);
}

.service-status-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #10b981;
}

/* Meus Aplicativos Grid */
.section-apps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-apps-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.section-apps-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.apps-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1400px) {
  .apps-grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .apps-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .apps-grid-container {
    grid-template-columns: 1fr;
  }
}

.app-box-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.app-box-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(37, 99, 235, 0.15);
}

.app-box-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.app-box-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-box-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-box-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-box-arrow {
  color: var(--text-muted);
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-box-card:hover .app-box-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: #38bdf8;
}

/* Bottom 3-Column Dashboard */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 20px;
}

@media (max-width: 1100px) {
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.activity-feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.activity-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-icon-bullet {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.activity-text {
  color: var(--text-primary);
}

.activity-time-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.status-dot-small {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.status-dot-small.green { background: #10b981; }
.status-dot-small.red { background: #f43f5e; }

/* Real-Time Executions */
.executions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.execution-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.execution-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.execution-title {
  color: var(--text-primary);
  font-weight: 500;
}

.execution-status-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
}

.execution-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.execution-bar {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  border-radius: 2px;
}

/* System Health Gauge */
.health-panel-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
}

.gauge-circle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gauge-svg {
  width: 130px;
  height: 130px;
}

.gauge-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gauge-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.gauge-tag {
  font-size: 10px;
  color: #10b981;
  font-weight: 600;
}

.gauge-sub {
  font-size: 9px;
  color: var(--text-muted);
}

.health-metrics-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}

.health-name {
  color: var(--text-secondary);
}

.health-val-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  color: #fff;
}

/* ==========================================================================
   VPS CLUSTER VIEW & DETAILED TELEMETRY TAB
   ========================================================================== */
.vps-cluster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1000px) {
  .vps-cluster-grid {
    grid-template-columns: 1fr;
  }
}

.vps-server-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.vps-server-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.vps-server-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vps-server-ip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-cyan-light);
  margin-top: 4px;
}

.vps-quick-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.vps-stat-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.vps-stat-card .value {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
}

.vps-stat-card .label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.data-table-container {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.custom-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.custom-data-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.custom-data-table tr:last-child td {
  border-bottom: none;
}

.custom-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* AI Fleet & Skills Grid */
.ai-fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.ai-agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}

.ai-agent-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.ai-agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-agent-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skills-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan-light);
  font-family: var(--font-mono);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 17, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.command-modal {
  width: 90%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(37, 99, 235, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 88vh;
}

.modal-header-banner {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-elevated);
}

.modal-body-scroll {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-search-box {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.modal-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 15px;
  outline: none;
}

.modal-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-item:hover, .modal-item.selected {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   CLAUDE VPS AGENT HUB — MULTIMODAL ARENA & DIAGNOSTIC CHIPS
   ========================================================================== */

.claude-hub-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  height: calc(100vh - 120px);
}

@media (max-width: 1100px) {
  .claude-hub-container {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.claude-chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.claude-chat-header {
  padding: 16px 20px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.vps-selector-group {
  display: flex;
  gap: 8px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.vps-pill-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.vps-pill-btn.active {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.quick-actions-bar {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.quick-action-chip {
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.quick-action-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.claude-messages-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble-row {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.chat-bubble-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-avatar.claude {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}
.chat-avatar.user {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
}

.chat-bubble-content {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
}

.chat-bubble-row.user .chat-bubble-content {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.2));
  border-color: rgba(59, 130, 246, 0.35);
}

.chat-bubble-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-input-container {
  padding: 14px 18px;
  background: var(--surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attached-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  color: #38bdf8;
}

.chat-input-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  resize: none;
  height: 44px;
}
.chat-textarea:focus {
  border-color: var(--border-active);
}

.btn-mic-record {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-mic-record:hover {
  color: #fff;
  border-color: var(--border-active);
}
.btn-mic-record.recording {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #f43f5e;
  animation: pulse-recording 1.2s infinite;
}

@keyframes pulse-recording {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.btn-send-msg {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 0 18px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-send-msg:hover {
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.agent-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   TERMINAL SENTINEL OS — PERMANENT WEB CLI
   ========================================================================== */

.terminal-os-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  gap: 14px;
}

.terminal-window {
  flex: 1;
  background: #070a13;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.terminal-window-header {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-window-dots {
  display: flex;
  gap: 6px;
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #10b981; }

.terminal-window-title {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: #e2e8f0;
  background: #050811;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #090e1c;
  padding: 10px 16px;
  border-top: 1px solid #1e293b;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.terminal-prompt-label {
  color: #10b981;
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}

.terminal-cli-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  caret-color: #38bdf8;
}

.terminal-macro-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.terminal-macro-btn {
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.terminal-macro-btn:hover {
  background: #1e293b;
  color: #38bdf8;
  border-color: #38bdf8;
}
