/* ==========================================================================
   PULSEOPS - CYBER-OPS DARK THEME DESIGN SYSTEM (VANILLA CSS)
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark-0: #06090e;
  --bg-dark-1: #0a0f18;
  --bg-dark-2: #101726;
  --bg-card: rgba(16, 24, 38, 0.75);
  --bg-card-hover: rgba(22, 33, 52, 0.85);
  --bg-input: rgba(10, 15, 24, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #00f0ff;
  --border-glow: rgba(0, 240, 255, 0.3);

  --accent-cyan: #00f0ff;
  --accent-cyan-dim: rgba(0, 240, 255, 0.12);
  --accent-green: #10b981;
  --accent-green-dim: rgba(16, 185, 129, 0.15);
  --accent-purple: #8b5cf6;
  --accent-purple-dim: rgba(139, 92, 246, 0.15);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.15);
  --accent-red: #f43f5e;
  --accent-red-dim: rgba(244, 63, 94, 0.15);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glass */
  --glass-blur: blur(16px);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.25);
  --shadow-glow-green: 0 0 16px rgba(16, 185, 129, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

/* Base Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark-0);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.04) 0%, transparent 45%);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-1);
}
::-webkit-scrollbar-thumb {
  background: #253347;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Global Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(10, 15, 24, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}
.logo-icon svg {
  width: 20px;
  height: 20px;
}
.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: #fff;
}
.brand-title .accent {
  color: var(--accent-cyan);
}
.brand-subtitle {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* Status Pill */
.server-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-dark-2);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}
.status-dot.pulsing {
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.server-name {
  font-weight: 600;
  color: var(--text-main);
}
.server-ip {
  color: var(--text-muted);
}
.server-mode-tag {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  background: rgba(16, 23, 38, 0.6);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-tab svg {
  width: 15px;
  height: 15px;
}
.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.nav-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.15);
}
.nav-badge {
  background: var(--accent-cyan);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}
.nav-pill-level {
  background: rgba(139, 92, 246, 0.3);
  color: #d8b4fe;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-uptime {
  text-align: right;
  font-family: var(--font-mono);
}
.uptime-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.uptime-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Main Container & Panes */
.app-main {
  flex: 1;
  padding: 28px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-pane.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #00f0ff, #0099ff);
  color: #040810;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.45);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
  color: #fff;
  border-color: var(--accent-cyan);
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 8px; font-size: 0.72rem; }

/* System Hero Banner */
.system-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: linear-gradient(135deg, rgba(16, 24, 38, 0.9), rgba(10, 15, 24, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur);
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.system-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-purple), transparent);
}
.hero-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.hero-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.hero-quick-actions {
  display: flex;
  gap: 12px;
}

/* 4-Cards Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  position: relative;
}
.metric-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon svg { width: 18px; height: 18px; }
.cpu-icon { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.mem-icon { background: var(--accent-purple-dim); color: var(--accent-purple); }
.disk-icon { background: var(--accent-amber-dim); color: var(--accent-amber); }
.net-icon { background: var(--accent-green-dim); color: var(--accent-green); }

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}
.card-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.metric-big-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

/* Sparklines */
.sparkline-container {
  height: 60px;
  width: 100%;
  margin-bottom: 14px;
}
.sparkline-container svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Cores List */
.cores-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.core-chip {
  background: var(--bg-dark-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px;
  text-align: center;
}
.core-name {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.core-bar-wrapper {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin: 4px 0;
  overflow: hidden;
}
.core-bar-fill {
  height: 100%;
  background: var(--accent-cyan);
  transition: width 0.3s ease;
}
.core-val {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

/* Memory Progress Stack */
.progress-bar-group {
  margin-bottom: 12px;
}
.progress-stack {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}
.bar-segment {
  height: 100%;
  transition: width 0.3s ease;
}
.bar-used { background: var(--accent-purple); }
.bar-cached { background: #3b82f6; }
.bar-free { background: rgba(255, 255, 255, 0.1); }

.progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.progress-legend .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}
.dot-used { background: var(--accent-purple); }
.dot-cached { background: #3b82f6; }
.dot-free { background: #64748b; }

.swap-indicator {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.mini-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.mini-bar div {
  height: 100%;
  background: var(--accent-amber);
}

/* Disk Partitions List */
.disk-partitions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.partition-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.partition-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
.mount-point { font-weight: 600; color: var(--text-main); }
.disk-used-text { color: var(--text-muted); }

/* Network Rates */
.net-flow-rates {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.net-rate.rx { color: var(--accent-green); }
.net-rate.tx { color: var(--accent-purple); }
.net-totals {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Secondary Overview Row (Services & Processes) */
.overview-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
}
@media (max-width: 980px) {
  .overview-secondary-grid { grid-template-columns: 1fr; }
}

.sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: var(--glass-blur);
}
.sub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sub-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.services-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.service-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-dark-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}
.service-chip .status-dot { width: 6px; height: 6px; }

/* Data Tables */
.table-container {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}
.data-table th {
  padding: 10px 12px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-family: var(--font-mono);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  font-family: var(--font-sans);
}
.badge-success { background: var(--accent-green-dim); color: #34d399; }
.badge-warning { background: var(--accent-amber-dim); color: #fbbf24; }
.badge-danger { background: var(--accent-red-dim); color: #f87171; }
.badge-purple { background: var(--accent-purple-dim); color: #c084fc; }

/* ==========================================================================
   TAB 2: WEBSITES & MULTI-PROJECT MANAGER
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}
.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.section-actions {
  display: flex;
  gap: 12px;
}

.websites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.site-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.25);
  transform: translateY(-2px);
}
.site-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.site-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.site-domain-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.site-domain-link:hover { text-decoration: underline; }

.site-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.site-meta-row {
  display: flex;
  justify-content: space-between;
}
.site-meta-label { color: var(--text-dim); }
.site-meta-val { font-family: var(--font-mono); color: var(--text-main); font-weight: 500; }

.ssl-status-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ssl-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}
.ssl-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.ssl-progress-fill {
  height: 100%;
  background: var(--accent-green);
}

.site-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.site-actions .btn { flex: 1; }

/* Log Viewer Drawer */
.log-viewer-panel {
  background: #05080e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}
.log-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.log-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.log-title-group h4 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #fff;
}
.log-terminal-output {
  background: #020408;
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 16px;
  border-radius: var(--radius-md);
  height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   TAB 3: REMOTE INTERACTIVE TERMINAL
   ========================================================================== */
.terminal-wrapper {
  background: #060910;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  height: 720px;
}
.terminal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d131f;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}
.term-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot.close { background: #f43f5e; }
.term-dot.min { background: #f59e0b; }
.term-dot.max { background: #10b981; }
.term-session-name {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.term-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}
.quick-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip-btn:hover {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
}

.term-server-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
  transition: all 0.25s ease;
}
.term-server-indicator.root-mode {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}
.indicator-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-beacon 1.8s infinite;
}
.term-server-indicator.root-mode .indicator-beacon {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
@keyframes pulse-beacon {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.indicator-title {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.indicator-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}
.term-server-indicator.root-mode .indicator-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}
.chip-btn.chip-verify {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.5);
  color: #38bdf8;
  font-weight: 600;
}
.chip-btn.chip-verify:hover {
  background: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}
.chip-btn.chip-root {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 600;
}
.chip-btn.chip-root:hover {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.term-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sudo-toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.sudo-toggle-label input { display: none; }
.sudo-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}
.sudo-toggle-label input:checked + .sudo-pill {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.terminal-screen {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
}
.ascii-banner {
  color: var(--accent-cyan);
  font-size: 0.65rem;
  line-height: 1.15;
  margin-bottom: 12px;
  user-select: none;
}
.term-welcome-msg {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.term-entry {
  margin-bottom: 14px;
}
.term-cmd-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.term-prompt-styled {
  color: var(--accent-green);
  font-weight: 700;
}
.term-output-block {
  color: #94a3b8;
  white-space: pre-wrap;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  line-height: 1.45;
}
.term-output-block.error {
  color: #f87171;
  border-left-color: var(--accent-red);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #090e17;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-top: auto;
}
.terminal-prompt {
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.terminal-input::placeholder { color: var(--text-dim); }

/* ==========================================================================
   TAB 4: AI COPILOT & LLM ACCESS HUB
   ========================================================================== */
.llm-governance-card {
  background: linear-gradient(135deg, rgba(20, 16, 38, 0.85), rgba(10, 15, 24, 0.9));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}
.gov-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #c084fc;
  background: var(--accent-purple-dim);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.gov-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.gov-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.gov-level-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 840px) {
  .gov-level-selector { grid-template-columns: 1fr; }
}
.level-option {
  display: block;
  cursor: pointer;
}
.level-option input { display: none; }
.level-box {
  background: rgba(10, 15, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.2s ease;
  height: 100%;
}
.level-option:hover .level-box {
  background: rgba(255, 255, 255, 0.04);
}
.level-option.active .level-box,
.level-option input:checked + .level-box {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.25);
}
.level-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 4px;
}
.level-detail {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Copilot Split Grid */
.copilot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
@media (max-width: 960px) {
  .copilot-grid { grid-template-columns: 1fr; }
}

.chat-card, .audit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  backdrop-filter: var(--glass-blur);
  height: 640px;
}
.chat-header, .audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-purple-dim);
  border: 1px solid var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
}
.ai-avatar svg { width: 18px; height: 18px; }
.chat-title, .audit-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.chat-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.quick-prompts-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.prompt-chip:hover {
  background: var(--accent-purple-dim);
  color: #d8b4fe;
  border-color: var(--accent-purple);
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 8px;
  margin-bottom: 14px;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.msg-ai { align-self: flex-start; }
.msg-user { align-self: flex-end; }
.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.45;
}
.msg-ai .msg-bubble {
  background: var(--bg-dark-1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-main);
}
.msg-user .msg-bubble {
  background: linear-gradient(135deg, #00f0ff, #0088ff);
  color: #050b14;
  font-weight: 500;
}

/* Copilot Command Action Box */
.copilot-action-box {
  margin-top: 10px;
  background: #060910;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.copilot-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 6px;
}
.copilot-cmd-snippet {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: block;
  overflow-x: auto;
}

.copilot-cmd-output {
  margin-top: 10px;
  background: #04070e;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.copilot-cmd-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.copilot-output-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.4;
}
.copilot-output-pre.text-danger {
  color: #f87171;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}
.chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}
.chat-input:focus { border-color: var(--accent-purple); }

/* Audit Feed & CLI Integration Box */
.audit-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.audit-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 6px;
  margin-bottom: 14px;
}
.audit-item {
  background: var(--bg-dark-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
.audit-item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}
.audit-cmd {
  color: var(--accent-cyan);
  font-weight: 600;
}
.audit-initiator {
  color: var(--text-dim);
  font-size: 0.68rem;
}

.cli-integration-box {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}
.cli-box-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}
.cli-box-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.code-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #04060a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.code-copy-row code { color: #38bdf8; }
.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-copy:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }

/* ==========================================================================
   TAB 5: CONNECTION & SETTINGS
   ========================================================================== */
.settings-container {
  max-width: 1080px;
  margin: 0 auto;
}
.settings-header {
  margin-bottom: 24px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: var(--glass-blur);
}
.settings-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 16px;
}
.form-row {
  display: flex;
  gap: 14px;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus { border-color: var(--accent-cyan); }

.mode-toggle-group {
  display: flex;
  gap: 12px;
}
.mode-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-dark-1);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-size: 0.82rem;
}
.mode-radio input { accent-color: var(--accent-cyan); }

.settings-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.test-feedback-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: #090e17;
  border: 1px solid var(--border-subtle);
}

.agent-install-box {
  margin: 16px 0;
}
.install-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.agent-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.agent-feat {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feat-icon { color: var(--accent-green); }

/* ==========================================================================
   MODAL WINDOW
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-dialog {
  background: var(--bg-dark-1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  animation: modalScale 0.2s ease-out;
}
@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-close:hover { color: #fff; }
.modal-body {
  padding: 24px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   DISCONNECTED / AWAITING SSH BANNER
   ========================================================================== */
.disconnected-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-out;
}
.disconnected-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.disconnected-content {
  flex: 1;
}
.disconnected-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fef3c7;
  margin-bottom: 4px;
}
.disconnected-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.disconnected-actions {
  flex-shrink: 0;
}

/* Score badge in header nav */
.score-badge {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   TAB 3: CYBERSECURITY AUDIT (LAMP STACK)
   ========================================================================== */
.security-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.security-hero-card {
  background: linear-gradient(135deg, rgba(16, 28, 48, 0.85), rgba(10, 16, 26, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
@media (max-width: 900px) {
  .security-hero-card { flex-direction: column; align-items: flex-start; }
}
.security-hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.security-hero-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.security-hero-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 680px;
}
.security-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Score Overview Grid */
.security-kpi-grid {
  display: grid;
  grid-template-columns: 240px repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 1024px) {
  .security-kpi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .security-kpi-grid { grid-template-columns: 1fr; }
}

.score-main-card {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12), rgba(10, 20, 28, 0.7));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}
.score-circle-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 3px solid #10b981;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.score-grade {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: #10b981;
  line-height: 1;
}
.score-pct {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}
.score-info {
  display: flex;
  flex-direction: column;
}
.score-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.score-status-val {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #10b981;
}
.score-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.kpi-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kpi-mini-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.kpi-mini-val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
}
.kpi-mini-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* 5 LAMP Pillars Tabs */
.lamp-pillars-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.pillar-filter-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.pillar-filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}
.pillar-filter-btn.active {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}
.pillar-count-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

/* Security Checks List */
.security-checks-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.security-check-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: all 0.2s ease;
}
.security-check-card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.check-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.check-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.badge-severity {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.severity-critique {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.severity-eleve {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.severity-moyen {
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-pillar {
  font-size: 0.72rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}
.check-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.check-status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.status-pass {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.status-fail {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.check-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.check-detail-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.check-code-block {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #38bdf8;
}
.check-code-block code {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Hardening Shell Box */
.hardening-script-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(9, 14, 23, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.hardening-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.hardening-box-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hardening-code-preview {
  background: #060910;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #a7f3d0;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre;
  line-height: 1.5;
}

/* ==========================================================================
   AUTHENTICATION & ACCOUNT SYSTEM STYLES
   ========================================================================== */
.header-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 4px 12px 4px 6px;
  backdrop-filter: var(--glass-blur);
}
.user-avatar-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-display-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}
.user-role-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: #ef4444;
}
.user-role-tag.role-admin {
  color: #10b981;
}
.btn-auth-action {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 12px;
}

/* Auth Modal Card */
.auth-modal-card {
  max-width: 480px;
  background: linear-gradient(145deg, #0f172a, #090e17);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.1);
}
.auth-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.auth-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.auth-body {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-error-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-security-notice {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-dim);
}
.security-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.security-item .sec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}
.btn-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}
.auth-footer {
  padding-top: 10px;
  border-top: none;
}

/* ==========================================================================
   TOP SYSTÈME EN DÉTAIL & CONSOLE RAW TOP
   ========================================================================== */
.top-system-card {
  position: relative;
  overflow: hidden;
}

.sub-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-accent-cyan {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 600;
}

.top-detail-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  background: rgba(10, 15, 24, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.top-stat-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.top-stat-label {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.top-stat-val {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raw-top-console-box {
  background: #03070d;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

.raw-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(16, 24, 38, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.raw-top-header code {
  color: var(--accent-cyan);
}

.raw-top-content {
  padding: 14px 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #38bdf8;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}

/* ==========================================================================
   DYNAMIC INTERACTIVE TOP IN TERMINAL
   ========================================================================== */
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-glow 1.5s infinite;
  margin-right: 6px;
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.dynamic-top-container {
  margin-top: 8px;
  background: #020509;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.dynamic-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(16, 24, 38, 0.95);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  font-size: 0.76rem;
  color: var(--text-main);
}

.dynamic-top-status {
  display: flex;
  align-items: center;
}

.dynamic-top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dynamic-top-hint {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.dynamic-top-live-screen {
  padding: 12px 14px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #38bdf8;
  line-height: 1.4;
  white-space: pre-wrap;
  max-height: 380px;
  overflow-y: auto;
}

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

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- USERS & RBAC ACCOUNT MANAGEMENT --- */
.kpi-users-row {
  margin-bottom: 20px;
}
.icon-users { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.icon-admin { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.icon-operator { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-viewer { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.users-table-card, .rbac-matrix-card {
  margin-bottom: 24px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-badge.role-admin {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.role-badge.role-operator {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.role-badge.role-viewer {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-badge.status-active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.status-badge.status-suspended {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.user-info-text {
  display: flex;
  flex-direction: column;
}
.user-info-login {
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.user-info-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.actions-cell {
  display: flex;
  gap: 6px;
}

.rbac-table th, .rbac-table td {
  padding: 12px 14px;
}
.rbac-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}


