/* ==========================================================================
   HOMELAB COMMAND & ARCHITECTURE CENTER — SPECIALIZED STYLES
   Sushen Jayasuriya | Homelab Infrastructure Tour & Diagnostics
   ========================================================================== */

/* Lab Header & Breadcrumb HUD */
.lab-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.lab-breadcrumb a {
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lab-breadcrumb a:hover {
  text-decoration: underline;
}

.lab-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}

@media (max-width: 992px) {
  .lab-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.lab-status-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}

.pulse-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Cluster HUD Telemetry Bar */
.cluster-telemetry-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 3.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.cluster-telemetry-hud::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00f0ff, #6366f1, #10b981);
}

@media (max-width: 768px) {
  .cluster-telemetry-hud {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hud-stat-item {
  display: flex;
  flex-direction: column;
}

.hud-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hud-stat-val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-stat-sub {
  font-size: 0.75rem;
  color: var(--emerald-status);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

/* ==========================================================================
   PHYSICAL SERVER RACK SHOWCASE
   ========================================================================== */
.rack-section-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 5rem;
}

@media (max-width: 1080px) {
  .rack-section-layout {
    grid-template-columns: 1fr;
  }
}

.rack-cabinet-frame {
  background: linear-gradient(180deg, #0c1220 0%, #060912 100%);
  border: 2px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,240,255,0.03);
  position: relative;
}

.rack-rails {
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 14px;
  background: repeating-linear-gradient(180deg, #1e293b 0, #1e293b 10px, transparent 10px, transparent 20px);
  border: 1px solid #334155;
  border-radius: 2px;
}

.rack-rail-left { left: 10px; }
.rack-rail-right { right: 10px; }

.rack-header-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.rack-units-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 0.5rem;
}

/* Individual Server Chassis Unit */
.rack-server-unit {
  background: linear-gradient(90deg, #111827 0%, #1f293d 50%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  position: relative;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  overflow: hidden;
}

.rack-server-unit::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #4b5563;
  transition: background 0.25s ease;
}

.rack-server-unit:hover {
  border-color: var(--cyan-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.15);
}

.rack-server-unit.active {
  border-color: var(--cyan-primary);
  background: linear-gradient(90deg, #122036 0%, #1a2e4c 50%, #122036 100%);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.25);
}

.rack-server-unit.active::after {
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
}

.unit-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.unit-u-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  color: var(--cyan-primary);
}

.unit-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.unit-role-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.badge-compute { background: rgba(0, 240, 255, 0.15); color: #00f0ff; border: 1px solid rgba(0,240,255,0.3); }
.badge-storage { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.badge-edge { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }

/* Front Bezel Hardware details: LEDs, Drive Bays */
.chassis-front-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  background: #0a0f1d;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #1e293b;
}

.drive-bay {
  height: 24px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.drive-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 4px #10b981;
  animation: driveActivity 1.2s infinite ease-in-out;
}

.drive-bay:nth-child(2) .drive-led { animation-delay: 0.3s; }
.drive-bay:nth-child(3) .drive-led { animation-delay: 0.7s; }
.drive-bay:nth-child(4) .drive-led { animation-delay: 0.5s; }

@keyframes driveActivity {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.chassis-nic-leds {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nic-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 6px #00f0ff;
  animation: nicBlink 0.4s infinite alternate;
}

.nic-led.traffic-amber {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation-duration: 0.3s;
}

@keyframes nicBlink {
  0% { opacity: 0.2; }
  100% { opacity: 1; }
}

/* Rack Node Inspector Card */
.node-inspector-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  min-height: 520px;
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.inspector-title-wrap h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.inspector-title-wrap p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan-primary);
}

.inspector-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.tab-btn.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--cyan-primary);
  font-weight: 600;
}

.inspector-tab-content {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.inspector-tab-content.active {
  display: block;
}

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

.specs-data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .specs-data-grid {
    grid-template-columns: 1fr;
  }
}

.spec-box {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.spec-box-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.spec-box-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.spec-box-val.mono {
  font-family: var(--font-mono);
  color: var(--cyan-primary);
}

.workload-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.workload-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(14, 21, 37, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ==========================================================================
   NETWORK TOPOLOGY & VLAN INTERACTIVE MAP
   ========================================================================== */
.topology-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.topology-vlan-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.vlan-filter-btn {
  background: rgba(14, 21, 37, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.vlan-filter-btn:hover {
  border-color: var(--cyan-primary);
  color: var(--text-primary);
}

.vlan-filter-btn.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.vlan-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.vlan-10 { background: #00f0ff; box-shadow: 0 0 8px #00f0ff; }
.vlan-20 { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.vlan-30 { background: #818cf8; box-shadow: 0 0 8px #818cf8; }
.vlan-40 { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.vlan-50 { background: #ec4899; box-shadow: 0 0 8px #ec4899; }

/* Interactive SVG Topology Diagram */
.topology-diagram-wrapper {
  background: #050811;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  overflow-x: auto;
}

.topology-diagram-wrapper svg {
  width: 100%;
  min-width: 780px;
  height: auto;
  display: block;
}

/* ==========================================================================
   SERVICES & CONTAINERS CATALOG MATRIX
   ========================================================================== */
.services-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0,240,255,0.08);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.service-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  font-size: 1.15rem;
}

.service-state {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--emerald-status);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.service-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.service-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.service-meta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 0.75rem;
  color: var(--text-muted);
}

.service-host-tag {
  color: var(--cyan-primary);
}

/* ==========================================================================
   BACKUP & DISASTER RECOVERY PIPELINE
   ========================================================================== */
.backup-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

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

.backup-stage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
}

.backup-stage-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.backup-stage-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.backup-stage-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Terminal & Diagnostics Simulator */
.lab-terminal-box {
  background: #04070f;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  margin-top: 2rem;
  box-shadow: 0 15px 35px rgba(0,0,0,0.7);
}

.lab-terminal-bar {
  background: #0d1527;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
}

.lab-terminal-title {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lab-terminal-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  max-height: 380px;
  overflow-y: auto;
  color: #cbd5e1;
}

.cmd-line {
  color: var(--cyan-primary);
  margin-bottom: 0.5rem;
}

.cmd-res {
  color: #94a3b8;
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.lab-quick-cmd-btn {
  background: rgba(14, 21, 37, 0.8);
  border: 1px solid #334155;
  color: var(--cyan-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.lab-quick-cmd-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan-primary);
}
