/* ==========================================================================
   FUTURISTIC SCIFI HUD THEME // GLOBAL STYLE SYSTEM
   ========================================================================== */

:root {
  /* Sleek neon sci-fi color palette */
  --bg-dark: #060b13;
  --bg-darker: #03060c;
  
  --neon-cyan: #00f0ff;
  --neon-cyan-dim: rgba(0, 240, 255, 0.3);
  --neon-cyan-glow: rgba(0, 240, 255, 0.15);
  
  --neon-magenta: #ff0055;
  --neon-magenta-dim: rgba(255, 0, 85, 0.3);
  --neon-magenta-glow: rgba(255, 0, 85, 0.15);
  
  --neon-green: #00ff66;
  --neon-green-dim: rgba(0, 255, 102, 0.3);
  --neon-green-glow: rgba(0, 255, 102, 0.15);
  
  --neon-amber: #ffaa00;
  --neon-amber-dim: rgba(255, 170, 0, 0.3);
  --neon-amber-glow: rgba(255, 170, 0, 0.15);

  --panel-bg: rgba(10, 18, 32, 0.65);
  --panel-border: rgba(0, 240, 255, 0.15);
  --panel-border-magenta: rgba(255, 0, 85, 0.25);
  --panel-glow: 0 0 15px rgba(0, 240, 255, 0.05);
  --panel-glow-hover: 0 0 25px rgba(0, 240, 255, 0.15);

  --text-primary: #d5f2ff;
  --text-secondary: #8aa3b5;
  --text-muted: #516b7c;
  
  --font-display: 'Orbitron', 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  
  --grid-gap: 20px;
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-display);
  overflow-x: hidden;
  height: 100vh;
  position: relative;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Monospace Helpers */
.font-mono {
  font-family: var(--font-mono);
}
.font-orbitron {
  font-family: 'Orbitron', sans-serif;
}
.font-xs {
  font-size: 11px;
}
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.row-span-1 { grid-row: span 1; }
.row-span-2 { grid-row: span 2; }

/* Custom Neon Colors classes */
.color-cyan { color: var(--neon-cyan); text-shadow: 0 0 5px var(--neon-cyan-dim); }
.color-magenta { color: var(--neon-magenta); text-shadow: 0 0 5px var(--neon-magenta-dim); }
.color-green { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green-dim); }
.color-amber { color: var(--neon-amber); text-shadow: 0 0 5px var(--neon-amber-dim); }

/* ==========================================================================
   FUTURISTIC SCANLINES & SCREEN EFFECT OVERLAYS
   ========================================================================== */

/* Dark ambient vignette and glowing grid backdrop */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 50% 50%, rgba(13, 27, 49, 0.4) 0%, rgba(3, 6, 12, 0.9) 100%),
    linear-gradient(rgba(18, 30, 49, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 30, 49, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
  pointer-events: none;
  z-index: -1;
}

/* CRT CRT scanlines */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 4px, 3px 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.85;
}

/* Hologram subtle flicker keyframes */
@keyframes hologramFlicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

.hologram-flicker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 230, 255, 0.003);
  pointer-events: none;
  z-index: 9998;
  animation: hologramFlicker 0.15s infinite;
}

/* ==========================================================================
   HUD STRUCTURE LAYOUT
   ========================================================================== */

.hud-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 15px 25px;
  z-index: 10;
}

/* HUD HEADER STYLE */
.hud-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  border-bottom: 2px solid var(--panel-border);
  padding-bottom: 12px;
  margin-bottom: 15px;
  position: relative;
  box-shadow: 0 10px 20px -10px rgba(0, 240, 255, 0.05);
}

.hud-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

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

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
  animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
  0% { transform: scale(1); opacity: 0.5; box-shadow: 0 0 2px var(--neon-green); }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 10px var(--neon-green); }
  100% { transform: scale(1); opacity: 0.5; box-shadow: 0 0 2px var(--neon-green); }
}

.status-lbl {
  color: var(--neon-green);
  font-weight: bold;
}

/* Glitch title animation */
.glitch-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text-primary);
  position: relative;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.server-node {
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-tag {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 12px;
}

.node-val {
  color: var(--neon-cyan);
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 1.15rem;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.server-os {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.system-uptime {
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  gap: 5px;
}

.uptime-lbl {
  color: var(--text-secondary);
}

.uptime-val {
  color: var(--text-primary);
  font-weight: 600;
}

.hud-clock {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  font-family: var(--font-mono);
  border-left: 1px solid var(--panel-border);
  padding-left: 15px;
}

/* Audio button synthesizer toggle */
.audio-btn {
  background: transparent;
  border: 1px solid var(--neon-cyan-dim);
  border-radius: 4px;
  color: var(--neon-cyan-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.25s ease;
}

.audio-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
  background: rgba(0, 240, 255, 0.03);
}

.audio-btn.active {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.audio-btn.muted {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

/* GRID LAYOUT MATRIX */
.hud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: var(--grid-gap);
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 10px;
}

/* Remove default scrollbar clutter */
.hud-grid::-webkit-scrollbar {
  width: 4px;
}
.hud-grid::-webkit-scrollbar-track {
  background: transparent;
}
.hud-grid::-webkit-scrollbar-thumb {
  background: var(--neon-cyan-dim);
  border-radius: 2px;
}

/* ==========================================================================
   WIDGETS & HUD CARDS
   ========================================================================== */

.hud-widget {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  box-shadow: var(--panel-glow);
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hud-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan-dim), transparent);
}

.hud-widget:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--panel-glow-hover);
}

/* Widget Header styles */
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 12px;
  position: relative;
}

.header-deco {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 25px;
  height: 1px;
  background-color: var(--neon-cyan);
  box-shadow: 0 0 5px var(--neon-cyan);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.hud-widget:hover .widget-title {
  color: var(--neon-cyan);
}

.widget-icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.hud-widget:hover .widget-icon {
  color: var(--neon-cyan);
}

.metric-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan-dim);
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.03);
  text-shadow: 0 0 3px var(--neon-cyan-dim);
}

.widget-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ==========================================================================
   CPU SPECIFIC LAYOUT
   ========================================================================== */

.radial-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 12px;
}

.gauge-container {
  position: relative;
  width: 90px;
  height: 90px;
}

.circular-gauge {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: rgba(0, 240, 255, 0.04);
  stroke-width: 6px;
}

.gauge-bar {
  fill: none;
  stroke-width: 6px;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.gauge-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
}

.gauge-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.gauge-unit {
  font-size: 10px;
  color: var(--text-secondary);
  margin-left: 1px;
}

.cpu-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 55%;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.meta-label {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.meta-value {
  font-weight: 700;
}

.cpu-model-txt {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  font-size: 10px;
}

.chart-container {
  height: 95px;
  position: relative;
  width: 100%;
}

/* ==========================================================================
   MEMORY PROGRESS BARS
   ========================================================================== */

.memory-progress-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.bar-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.bar-track {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.25, 1);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.bar-fill.color-cyan { background-color: var(--neon-cyan); box-shadow: 0 0 8px rgba(0, 240, 255, 0.4); }
.bar-fill.color-magenta { background-color: var(--neon-magenta); box-shadow: 0 0 8px rgba(255, 0, 85, 0.4); }
.bar-fill.color-green { background-color: var(--neon-green); box-shadow: 0 0 8px rgba(0, 255, 102, 0.4); }

/* ==========================================================================
   STORAGE VOLUMES SECTION
   ========================================================================== */

.storage-body {
  overflow-y: auto;
}

.storage-drives-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-drive-item {
  border: 1px solid rgba(0, 240, 255, 0.06);
  border-radius: 4px;
  background: rgba(3, 6, 12, 0.4);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storage-drive-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.drive-mount-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
}

.drive-fs-lbl {
  font-size: 9px;
  color: var(--text-muted);
}

.drive-values {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.storage-mini-gauge {
  position: relative;
  width: 50px;
  height: 50px;
}

.drive-overlay-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
}

/* ==========================================================================
   SERVICES GRID CHIPS
   ========================================================================== */

.services-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.services-matrix-grid::-webkit-scrollbar {
  width: 4px;
}
.services-matrix-grid::-webkit-scrollbar-thumb {
  background: var(--neon-cyan-dim);
}

.service-card {
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  background: rgba(3, 6, 12, 0.3);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s ease;
}

.service-card:hover {
  background: rgba(0, 240, 255, 0.02);
  border-color: rgba(0, 240, 255, 0.1);
}

.service-card.active {
  border-left: 2px solid var(--neon-green);
}

.service-card.inactive {
  border-left: 2px solid var(--neon-magenta);
}

.srv-name {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90px;
}

.service-card:hover .srv-name {
  color: var(--text-primary);
}

.srv-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.service-card.active .srv-indicator {
  background-color: var(--neon-green);
  box-shadow: 0 0 5px var(--neon-green);
}

.service-card.inactive .srv-indicator {
  background-color: var(--neon-magenta);
  box-shadow: 0 0 5px var(--neon-magenta);
  animation: alarmPulse 1s infinite ease-in-out;
}

@keyframes alarmPulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* ==========================================================================
   NETWORK STYLING
   ========================================================================== */

.network-rates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  margin-bottom: 8px;
}

.net-stat-sub {
  border: 1px solid rgba(0, 240, 255, 0.05);
  border-radius: 4px;
  background: rgba(3, 6, 12, 0.4);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.net-sub-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
}

.net-sub-num {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.net-sub-total {
  font-size: 9px;
  color: var(--text-muted);
}

/* ==========================================================================
   PROCESS MATRIX TABLE
   ========================================================================== */

.process-body {
  overflow-y: auto;
  max-height: 250px;
}

.process-table-container {
  width: 100%;
}

.process-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}

.process-table th {
  border-bottom: 1px solid var(--panel-border);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 6px 4px;
  text-transform: uppercase;
}

.process-table td {
  padding: 6px 4px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.process-table tbody tr:hover td {
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.02);
}

.process-table tr td:first-child {
  color: var(--neon-cyan-dim);
}

.txt-right { text-align: right; }
.txt-center { text-align: center; }

/* ==========================================================================
   TACTICAL EVENT LOGS (TERMINAL CONSOLE)
   ========================================================================== */

.terminal-body {
  background: rgba(3, 6, 12, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: 4px;
  padding: 10px;
  height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse; /* Scroll anchored to bottom */
}

.terminal-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-body::-webkit-scrollbar {
  width: 4px;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: var(--neon-cyan-dim);
}

.term-line {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  position: relative;
  padding-left: 12px;
}

.term-line::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--neon-cyan-dim);
}

.term-line.cmd-line {
  color: var(--neon-cyan);
}

.term-line.sys-alert {
  color: var(--neon-magenta);
}

.term-line.sys-ok {
  color: var(--neon-green);
}

.term-line.sys-info {
  color: var(--neon-amber);
}

.hud-btn {
  background: transparent;
  border: 1px solid var(--neon-cyan-dim);
  border-radius: 3px;
  color: var(--neon-cyan-dim);
  padding: 2px 8px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.02);
}

/* ==========================================================================
   HUD FOOTER SYSTEM
   ========================================================================== */

.hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 10px;
  margin-top: 15px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

#conn-status {
  font-size: 11px;
  font-weight: bold;
}

/* ==========================================================================
   CRITICAL EMERGENCY DANGER PANEL
   ========================================================================== */

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 3, 6, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.alert-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.alert-box {
  background: rgba(20, 5, 10, 0.95);
  border: 2px solid var(--neon-magenta);
  box-shadow: 0 0 35px rgba(255, 0, 85, 0.4);
  border-radius: 8px;
  width: 450px;
  max-width: 90%;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: alertGlitch 0.25s infinite;
}

@keyframes alertGlitch {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

.alert-flash {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--neon-magenta);
  text-shadow: 0 0 10px var(--neon-magenta-glow);
  letter-spacing: 2px;
}

.alert-details {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 0, 85, 0.15);
}

.alert-btn {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  padding: 8px 24px;
  font-size: 12px;
  font-weight: 800;
}

.alert-btn:hover {
  background: rgba(255, 0, 85, 0.05);
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

/* Flash widget overlay in high resources alarm */
.hud-widget.warning-flash {
  border-color: var(--neon-magenta) !important;
  box-shadow: 0 0 20px var(--neon-magenta-glow) !important;
  animation: borderFlickerRed 1.5s infinite ease-in-out;
}

@keyframes borderFlickerRed {
  0% { border-color: rgba(255, 0, 85, 0.3); }
  50% { border-color: var(--neon-magenta); }
  100% { border-color: rgba(255, 0, 85, 0.3); }
}

/* ==========================================================================
   UPS POWER GRID STYLING
   ========================================================================== */

.ups-error {
  color: var(--neon-magenta);
  text-shadow: 0 0 5px var(--neon-magenta-glow);
  font-size: 11px;
  text-align: center;
  margin: auto;
  padding: 15px;
  border: 1px dashed rgba(255, 0, 85, 0.2);
  background: rgba(255, 0, 85, 0.02);
  border-radius: 4px;
}

.ups-grid-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.ups-header-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.05);
  padding-bottom: 10px;
}

.power-draw-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.power-large {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
  line-height: 1;
}

.power-unit {
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-top: 4px;
}

.battery-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hud-battery {
  width: 20px;
  height: 36px;
  border: 2px solid var(--text-secondary);
  border-radius: 3px;
  padding: 2px;
  position: relative;
  box-shadow: inset 0 0 5px rgba(0, 240, 255, 0.05);
}

.battery-tip {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 3px;
  background-color: var(--text-secondary);
  border-radius: 1px 1px 0 0;
}

.battery-shell {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: flex-end;
  border-radius: 1px;
  overflow: hidden;
}

.battery-fill {
  width: 100%;
  transition: height 0.6s cubic-bezier(0.1, 0.8, 0.25, 1), background-color 0.5s ease;
  box-shadow: 0 0 8px currentColor;
}

.battery-fill.color-green { background-color: var(--neon-green); color: var(--neon-green); }
.battery-fill.color-amber { background-color: var(--neon-amber); color: var(--neon-amber); }
.battery-fill.color-magenta { background-color: var(--neon-magenta); color: var(--neon-magenta); }

.battery-lbl {
  font-size: 10px;
  font-weight: bold;
}

.ups-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ups-meta-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 4px;
}

.ups-lbl {
  color: var(--text-secondary);
}

.ups-val {
  color: var(--text-primary);
  font-weight: bold;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   SYSTEM UTILITIES ACTION PANEL STYLING
   ========================================================================== */

.actions-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.actions-panel-desc {
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  border-left: 2px solid var(--neon-cyan-dim);
  padding-left: 6px;
  margin-bottom: 6px;
}

.action-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  justify-content: center;
}

.action-btn {
  background: rgba(3, 6, 12, 0.5);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text-secondary);
  padding: 8px 14px;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.1, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 1px;
}

.btn-deco-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--neon-magenta);
  opacity: 0.5;
  transition: opacity 0.2s, background-color 0.2s;
}

.action-btn:hover {
  background: rgba(0, 240, 255, 0.03);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  padding-left: 18px;
}

.action-btn:hover .btn-deco-bar {
  opacity: 1;
  background-color: var(--neon-cyan);
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--text-muted) !important;
  color: var(--text-muted) !important;
  padding-left: 14px !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.action-btn:disabled .btn-deco-bar {
  background-color: var(--text-muted) !important;
  opacity: 0.3 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */


@media (max-width: 1200px) {
  .hud-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .col-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 800px) {
  .hud-grid {
    grid-template-columns: 1fr;
  }
  .col-span-1, .col-span-2, .col-span-3 {
    grid-column: span 1;
  }
  .hud-header {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }
  .header-left, .header-center, .header-right {
    justify-content: center;
    align-items: center;
  }
  .hud-clock {
    border-left: none;
    padding-left: 0;
  }
  body {
    overflow-y: auto;
    height: auto;
  }
  .hud-container {
    height: auto;
  }
}

/* ==========================================================================
   DOCKER MATRIX REACTOR STYLING
   ========================================================================== */
.docker-body {
  padding: 10px;
}

.docker-table-container {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.docker-table-container::-webkit-scrollbar {
  width: 4px;
}
.docker-table-container::-webkit-scrollbar-thumb {
  background: var(--neon-cyan-dim);
}

.docker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.docker-table th {
  text-align: left;
  color: var(--neon-cyan);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 8px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  background: #060b13;
  z-index: 10;
}

.docker-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  vertical-align: middle;
}

.docker-table tbody tr {
  transition: all 0.2s ease;
}

.docker-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.03);
}

.docker-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
}

.docker-status-pill.running {
  background: rgba(0, 255, 100, 0.08);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 100, 0.2);
}

.docker-status-pill.exited,
.docker-status-pill.stopped {
  background: rgba(255, 0, 85, 0.08);
  color: var(--neon-magenta);
  border: 1px solid rgba(255, 0, 85, 0.2);
}

.docker-status-pill .pulse-indicator {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.docker-status-pill.running .pulse-indicator {
  box-shadow: 0 0 8px var(--neon-green);
  animation: led-blink 1.5s infinite;
}

/* ==========================================================================
   SECURE SHELL TERMINAL STYLING
   ========================================================================== */
.ssh-body {
  position: relative;
  padding: 12px;
  height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Security Portal Gateway */
.ssh-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  border: 1px dashed rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  background: rgba(5, 10, 20, 0.4);
  backdrop-filter: blur(5px);
  padding: 20px;
}

.ssh-gate-title {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--neon-magenta);
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
  margin-bottom: 5px;
}

.ssh-gate-subtitle {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.ssh-gate-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gate-prompt {
  font-size: 11px;
  color: var(--text-secondary);
}

.ssh-input {
  background: rgba(6, 11, 19, 0.8);
  border: 1px solid var(--neon-cyan-dim);
  border-radius: 4px;
  padding: 6px 12px;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  outline: none;
  width: 140px;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 5px rgba(0, 240, 255, 0.1);
}

.ssh-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2), inset 0 0 5px rgba(0, 240, 255, 0.2);
}

/* Interactive Shell Console */
.ssh-terminal-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(2, 4, 8, 0.65);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 4px;
  padding: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ssh-terminal-box::-webkit-scrollbar {
  width: 4px;
}
.ssh-terminal-box::-webkit-scrollbar-thumb {
  background: var(--neon-cyan-dim);
}

.ssh-term-output {
  white-space: pre-wrap;
  word-break: break-all;
  color: rgba(0, 240, 255, 0.85);
  font-size: 11px;
  line-height: 14px;
}

.ssh-input-line {
  display: flex;
  align-items: center;
  margin-top: 5px;
  font-size: 11px;
}

.ssh-prompt {
  color: var(--neon-magenta);
  margin-right: 8px;
  white-space: nowrap;
}

.ssh-input-wrapper {
  position: relative;
  flex: 1;
  display: inline-flex;
  align-items: center;
}

.ssh-buf {
  color: #fff;
  min-width: 1px;
}

.ssh-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--neon-cyan);
  box-shadow: 0 0 5px var(--neon-cyan);
  animation: term-cursor-blink 1s infinite;
  margin-left: 1px;
}

.ssh-hidden-field {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
  background: transparent;
  border: none;
  color: transparent;
  outline: none;
}

.ssh-status {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
}

@keyframes term-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ==========================================================================
   HOLOGRAPHIC SECURITY SIGN-IN GATE
   ========================================================================== */

.login-portal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: radial-gradient(circle at center, rgba(8, 12, 20, 0.98) 0%, rgba(2, 4, 8, 1) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

.login-portal.unlocked {
  transform: translateY(-100vh);
  opacity: 0;
  pointer-events: none;
}

.login-panel {
  width: 90%;
  max-width: 460px;
  padding: 40px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.05), inset 0 0 20px rgba(0, 240, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-panel.warning-alert {
  border-color: var(--neon-magenta) !important;
  box-shadow: 0 0 50px rgba(255, 0, 85, 0.2), inset 0 0 20px rgba(255, 0, 85, 0.05) !important;
  animation: warningFlash 0.5s infinite alternate;
}

@keyframes warningFlash {
  0% { box-shadow: 0 0 40px rgba(255, 0, 85, 0.1), inset 0 0 20px rgba(255, 0, 85, 0.02); }
  100% { box-shadow: 0 0 50px rgba(255, 0, 85, 0.3), inset 0 0 20px rgba(255, 0, 85, 0.08); }
}

.security-badge-container {
  width: 80px;
  height: 80px;
  margin-bottom: 25px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.security-badge-shield {
  font-size: 40px;
  z-index: 2;
  filter: drop-shadow(0 0 10px var(--neon-cyan));
  animation: shieldFloat 3s infinite ease-in-out;
}

.login-panel.warning-alert .security-badge-shield {
  filter: drop-shadow(0 0 15px var(--neon-magenta));
}

@keyframes shieldFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.security-badge-glow {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
  animation: badgeGlowPulse 2s infinite ease-in-out;
}

.login-panel.warning-alert .security-badge-glow {
  background: radial-gradient(circle, rgba(255, 0, 85, 0.2) 0%, transparent 70%);
}

@keyframes badgeGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

.login-title {
  text-align: center;
  margin-bottom: 5px;
  letter-spacing: 2px;
}

.login-subtitle {
  text-align: center;
  margin-bottom: 35px;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.input-container {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 6, 12, 0.5);
  border-radius: 4px;
  padding: 0 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-container:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.login-panel.warning-alert .input-container:focus-within {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.15);
}

.input-icon {
  font-size: 14px;
  margin-right: 10px;
  color: var(--text-muted);
}

.hud-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 12px 0;
  color: #fff;
  font-size: 13px;
  letter-spacing: 1px;
  outline: none !important;
}

.hud-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.login-btn {
  margin-top: 10px;
  width: 100%;
  padding: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}

.login-diagnostics {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 10px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diagnostics-status-line {
  font-weight: bold;
  letter-spacing: 1px;
}

.diagnostics-log {
  font-size: 9px;
}

/* Read-only overview additions */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.overview-card {
  min-height: 96px;
  border: 1px solid rgba(0, 240, 255, 0.14);
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.88), rgba(4, 10, 20, 0.88));
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.04);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.overview-label {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 1px;
}

.overview-value {
  color: var(--text-primary);
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.16);
}

@media (max-width: 860px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 14px;
}

.nav-btn {
  text-decoration: none;
}

.diagnostics-log {
  margin-top: 18px;
  text-align: center;
  min-height: 18px;
}

.login-form {
  width: 100%;
}

.input-field-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.input-container {
  width: 100%;
}

.hud-input {
  width: 100%;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: rgba(5, 14, 27, 0.85);
  color: var(--text-primary);
  padding: 12px 14px;
  outline: none;
}

.hud-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.12);
}

.terminal-page {
  min-height: 100vh;
}

.terminal-page-header {
  margin: 0;
}

.terminal-shell-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 24px;
}

.terminal-main-panel {
  flex: 1;
  display: flex;
  min-height: 0;
}

.terminal-shell-box {
  flex: 1;
  min-height: 70vh;
  min-width: 0;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: linear-gradient(180deg, rgba(4, 11, 21, 0.96), rgba(1, 4, 10, 0.96));
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.04), 0 0 30px rgba(0, 240, 255, 0.06);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

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

.terminal-session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.terminal-session-select,
.terminal-session-name {
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(7, 16, 31, 0.75);
  color: var(--text-primary);
  padding: 8px 10px;
  min-width: 140px;
}

.terminal-viewport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 4px 0;
  scroll-behavior: smooth;
  user-select: text;
}

.terminal-xterm-host {
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(7, 16, 31, 0.88);
}

.terminal-xterm-host .xterm {
  height: 100%;
  padding: 10px 12px;
}

.terminal-xterm-host .xterm-viewport {
  overflow-y: auto !important;
}

.terminal-input-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  padding-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(4, 11, 21, 0.35), rgba(1, 4, 10, 0.98) 24%);
  backdrop-filter: blur(4px);
}

.terminal-status-label {
  color: var(--neon-green);
  letter-spacing: 1px;
}

.terminal-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#terminal-send-btn {
  border-color: rgba(0, 255, 102, 0.3);
  color: var(--neon-green);
}

.terminal-control-btn {
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1;
}

.terminal-live-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(7, 16, 31, 0.75);
  padding: 10px 12px;
}

.terminal-live-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  outline: none;
  caret-color: var(--neon-cyan);
  font-size: 14px;
  user-select: text;
}

.terminal-live-input::placeholder {
  color: var(--text-muted);
}

.terminal-connection-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 transparent;
}

.terminal-connection-dot.online {
  background: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.65);
}

.terminal-connection-dot.connecting {
  background: var(--neon-amber);
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

.terminal-connection-dot.offline {
  background: var(--neon-magenta);
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
}

.terminal-status-copy {
  min-width: 0;
  color: var(--text-muted);
}

.service-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-restart-btn {
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon-cyan);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-family: var(--font-mono);
  cursor: pointer;
}

.mini-restart-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.terminal-viewport::-webkit-scrollbar,
.file-table-wrap::-webkit-scrollbar,
.file-sidebar::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.terminal-viewport::-webkit-scrollbar-thumb,
.file-table-wrap::-webkit-scrollbar-thumb,
.file-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 999px;
}

.files-page {
  min-height: 100vh;
}

.files-shell-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 24px;
}

.files-main-panel {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.file-sidebar,
.file-browser-panel {
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: linear-gradient(180deg, rgba(4, 11, 21, 0.96), rgba(1, 4, 10, 0.96));
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.04), 0 0 30px rgba(0, 240, 255, 0.06);
}

.file-sidebar {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
}

.file-browser-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.files-panel-title {
  font-size: 1rem;
  letter-spacing: 1px;
}

.files-path-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.files-path-value,
.files-root-value {
  color: var(--neon-cyan);
  word-break: break-word;
}

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

.files-upload-wrap {
  position: relative;
  overflow: hidden;
}

.files-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.files-status {
  min-height: 44px;
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(7, 16, 31, 0.7);
  padding: 10px 12px;
  line-height: 1.4;
}

.file-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.file-meta-card {
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(7, 16, 31, 0.7);
  padding: 12px;
}

.file-meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 11px;
}

.file-meta-value {
  color: var(--text-primary);
}

.file-browser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.file-browser-title-group {
  min-width: 0;
}

.file-browser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(7, 16, 31, 0.7);
}

.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th,
.file-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  text-align: left;
  font-size: 13px;
}

.file-table th {
  position: sticky;
  top: 0;
  background: rgba(5, 14, 27, 0.96);
  color: var(--text-secondary);
  z-index: 1;
}

.file-entry-row {
  cursor: pointer;
}

.file-entry-row:hover {
  background: rgba(0, 240, 255, 0.06);
}

.file-entry-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-kind-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 4px 8px;
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 1px;
}

.file-kind-pill.directory {
  color: var(--neon-green);
  border-color: rgba(0, 255, 102, 0.25);
}

.file-kind-pill.file {
  color: var(--neon-cyan);
}

.file-actions-cell {
  width: 140px;
}

.file-inline-actions {
  display: flex;
  gap: 8px;
}

.file-empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-secondary);
}

@media (max-width: 980px) {
  .files-main-panel {
    grid-template-columns: 1fr;
  }

  .terminal-shell-layout,
  .files-shell-layout {
    padding: 14px;
  }

  .terminal-output-view,
  .terminal-live-input {
    font-size: 13px;
  }

  .terminal-control-row {
    gap: 6px;
  }

  .terminal-control-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}
