/* ============================================
   KUSANAGI - Ghost in the Shell Cyberpunk Theme
   ============================================ */

:root {
  --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.theme-cyberpunk {
  --neon-green: #00ff41;
  --neon-cyan: #00ffff;
  --neon-magenta: #ff00ff;
  --neon-pink: #ff2a6d;
  --dark-bg: #0a0a0f;
  --darker-bg: #050508;
  --grid-color: rgba(0, 255, 65, 0.1);
  --text-primary: #e0e0e0;
  --text-secondary: #888;
}

/* Light Theme */
:root[data-theme="light"] {
  --neon-green: #00aa28;
  --neon-cyan: #0088aa;
  --neon-magenta: #aa00aa;
  --neon-pink: #cc1155;
  --dark-bg: #f5f5f7;
  --darker-bg: #e8e8ec;
  --grid-color: rgba(0, 100, 40, 0.08);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
}

/* Smooth transitions for theme switching */
body,
.container,
.terminal,
.stat-box,
.node-card,
.issues-table-container,
.quick-nav,
.ext-link,
.tab-btn,
.chat-container,
.chat-input,
.chat-send-btn {
  transition: var(--theme-transition);
}


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

body {
  font-family: 'Courier New', 'Fira Code', monospace;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated Grid Background */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  z-index: -2;
}

@keyframes gridMove {
  0% {
    transform: perspective(500px) rotateX(60deg) translateY(0);
  }

  100% {
    transform: perspective(500px) rotateX(60deg) translateY(50px);
  }
}

/* Scan Lines Overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.1) 0px,
      rgba(0, 0, 0, 0.1) 1px,
      transparent 1px,
      transparent 2px);
  pointer-events: none;
  z-index: 1000;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  padding: 1rem 0;
  position: relative;
  margin-bottom: 2rem;
}

/* Header Content Layout */
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.header-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 5px var(--neon-green));
}

.header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.header-sub {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Theme Toggle Button */
.theme-toggle {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--neon-cyan);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
}

.theme-toggle:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

:root[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--neon-cyan);
}

:root[data-theme="light"] .scanlines {
  opacity: 0.3;
}

.logo {
  font-size: 2.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  color: var(--neon-green);
  text-shadow:
    0 0 5px var(--neon-green),
    0 0 10px var(--neon-green);
  /* glitch animation removed for cleaner look, or reduced */
  position: relative;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--neon-cyan);
  letter-spacing: 0.1rem;
}

.japanese-text {
  font-size: 0.8rem;
  color: var(--neon-pink);
  opacity: 0.8;
}

/* Mobile responsive adjustments for header */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header-text {
    align-items: center;
  }

  .logo {
    font-size: 2rem;
  }

  .header-logo {
    height: 40px;
  }
}


@keyframes glitch {

  0%,
  90%,
  100% {
    transform: translate(0);
  }

  91% {
    transform: translate(-2px, 1px);
  }

  92% {
    transform: translate(2px, -1px);
  }

  93% {
    transform: translate(-1px, 2px);
  }
}

@keyframes glitch-1 {

  0%,
  90%,
  100% {
    transform: translate(0);
    opacity: 0;
  }

  91% {
    transform: translate(3px, 0);
    opacity: 0.8;
  }

  92% {
    transform: translate(-3px, 0);
    opacity: 0.8;
  }

  93% {
    transform: translate(0);
    opacity: 0;
  }
}

@keyframes glitch-2 {

  0%,
  90%,
  100% {
    transform: translate(0);
    opacity: 0;
  }

  91% {
    transform: translate(-3px, 0);
    opacity: 0.8;
  }

  92% {
    transform: translate(3px, 0);
    opacity: 0.8;
  }

  93% {
    transform: translate(0);
    opacity: 0;
  }
}

.subtitle {
  font-size: 1.2rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  margin-top: 1rem;
  opacity: 0.8;
}

/* Japanese Text Decoration */
.japanese-text {
  font-size: 0.9rem;
  color: var(--neon-magenta);
  opacity: 0.6;
  margin-top: 0.5rem;
  letter-spacing: 0.5rem;
}

/* Quick Navigation Bar */
.quick-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 8px;
}

.quick-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-icon {
  font-size: 1.2rem;
}

.quick-value {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--neon-cyan);
}

.quick-label {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
}

.external-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ext-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 4px;
  color: var(--neon-green);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.ext-link:hover {
  background: rgba(0, 255, 65, 0.2);
  border-color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
  transform: translateY(-2px);
}

.link-icon {
  font-size: 1rem;
}

/* Terminal Section */
.terminal {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  padding: 2rem;
  margin: 3rem 0;
  position: relative;
  box-shadow:
    0 0 20px rgba(0, 255, 65, 0.2),
    inset 0 0 60px rgba(0, 255, 65, 0.05);
}

.terminal::before {
  content: '● ● ●';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  color: var(--neon-green);
  font-size: 0.8rem;
  letter-spacing: 0.3rem;
}

.terminal-header {
  color: var(--neon-cyan);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.terminal-content {
  font-size: 0.95rem;
  line-height: 1.8;
}

.terminal-line {
  margin: 0.5rem 0;
  opacity: 0;
  animation: typeIn 0.5s forwards;
}

.terminal-line:nth-child(1) {
  animation-delay: 0.5s;
}

.terminal-line:nth-child(2) {
  animation-delay: 1s;
}

.terminal-line:nth-child(3) {
  animation-delay: 1.5s;
}

.terminal-line:nth-child(4) {
  animation-delay: 2s;
}

.terminal-line:nth-child(5) {
  animation-delay: 2.5s;
}

@keyframes typeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.prompt {
  color: var(--neon-green);
}

.command {
  color: var(--neon-cyan);
}

.output {
  color: var(--text-primary);
}

.highlight {
  color: var(--neon-magenta);
}

/* Status Cards */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.status-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 30, 0.9) 100%);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.status-card:hover::before {
  left: 100%;
}

.status-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
  transform: translateY(-5px);
}

.card-title {
  color: var(--neon-cyan);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title::before {
  content: '▸';
  color: var(--neon-green);
}

.card-value {
  font-size: 2rem;
  color: var(--neon-green);
  font-weight: bold;
}

.card-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Blinking Cursor */
.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--neon-green);
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-top: 1px solid rgba(0, 255, 65, 0.2);
  margin-top: 3rem;
}

.footer-quote {
  color: var(--neon-cyan);
  font-style: italic;
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* ArgoCD Status Section */
.argocd-section {
  margin: 1.5rem 0;
}

.argocd-section:first-of-type {
  margin-top: 0;
}

.section-title {
  color: var(--neon-cyan);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::before {
  content: '⬡';
  color: var(--neon-green);
}

/* ArgoCD Stats Grid */
.argocd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-box:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

.stat-box.healthy {
  border-color: var(--neon-green);
}

.stat-box.unhealthy {
  border-color: #ff4444;
}

.stat-box.warning {
  border-color: #ffaa00;
}

.stat-box.info {
  border-color: var(--neon-cyan);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--neon-green);
}

.stat-box.unhealthy .stat-value {
  color: #ff4444;
}

.stat-box.warning .stat-value {
  color: #ffaa00;
}

.stat-box.info .stat-value {
  color: var(--neon-cyan);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-top: 0.5rem;
}

/* Issues Table */
.issues-table-container {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--neon-magenta);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.1);
}

.issues-table-header {
  background: rgba(255, 0, 255, 0.1);
  padding: 1rem;
  border-bottom: 1px solid var(--neon-magenta);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.issues-table-title {
  color: var(--neon-magenta);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

.issues-count {
  background: var(--neon-magenta);
  color: var(--dark-bg);
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  font-weight: bold;
  font-size: 0.8rem;
}

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

.issues-table th,
.issues-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}

.issues-table th {
  color: var(--neon-cyan);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  background: rgba(0, 0, 0, 0.5);
}

.issues-table tr:hover {
  background: rgba(255, 0, 255, 0.05);
}

.issues-table td {
  font-size: 0.85rem;
}

.app-name {
  color: var(--neon-green);
  font-weight: bold;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: bold;
}

.status-badge.healthy {
  background: rgba(0, 255, 65, 0.2);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

.status-badge.progressing {
  background: rgba(0, 255, 255, 0.2);
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
}

.status-badge.unknown {
  background: rgba(255, 170, 0, 0.2);
  color: #ffaa00;
  border: 1px solid #ffaa00;
}

.status-badge.degraded,
.status-badge.outofsync,
.status-badge.missing {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border: 1px solid #ff4444;
}

.status-badge.synced {
  background: rgba(0, 255, 65, 0.2);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

.error-duration {
  color: var(--neon-magenta);
  font-family: monospace;
}

.error-message {
  color: var(--text-secondary);
  font-size: 0.75rem;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Loading State */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: var(--neon-cyan);
}

.loading::before {
  content: '⟳';
  margin-right: 0.5rem;
  animation: spin 1s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

/* No Issues State */
.no-issues {
  text-align: center;
  padding: 2rem;
  color: var(--neon-green);
}

.no-issues::before {
  content: '✓';
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

/* Sync Button */
.sync-btn {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
  color: var(--dark-bg);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.75rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.sync-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.sync-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ===================== */
/* NODE MONITORING STYLES */
/* ===================== */

.nodes-container {
  margin-top: 1rem;
}

.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.node-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--neon-green);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 65, 0.2);
}

.node-card.node-notready {
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.node-name {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: var(--neon-green);
  font-size: 0.9rem;
}

/* Architecture badges with different colors */
.arch-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.arch-badge.arch-amd {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.arch-badge.arch-arm {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

/* Node Title with Type */
.node-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.node-type {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Node Resources */
.node-resources {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.resource-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resource-icon {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}

.resource-label {
  color: #888;
  font-size: 0.7rem;
  text-transform: uppercase;
  width: 40px;
}

.resource-value {
  color: var(--neon-cyan);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  flex: 1;
  text-align: right;
}

/* Pod Usage Bar */
.pods-row {
  flex-wrap: wrap;
}

.pod-bar-container {
  flex: 1;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  min-width: 80px;
}

.pod-bar {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 4px;
}

.pod-bar.bar-ok {
  background: linear-gradient(90deg, var(--neon-green) 0%, var(--neon-cyan) 100%);
}

.pod-bar.bar-warning {
  background: linear-gradient(90deg, #f5a623 0%, #ff8c00 100%);
}

.pod-bar.bar-danger {
  background: linear-gradient(90deg, #ff4444 0%, #ff6b6b 100%);
}

.pod-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Node Uptime */
.node-uptime {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(0, 255, 65, 0.2);
  margin-top: 0.5rem;
}

.uptime-icon {
  font-size: 0.8rem;
}

.uptime-value {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--neon-green);
}

/* Node Errors - Enhanced */
.node-card.has-errors {
  border-color: rgba(255, 100, 100, 0.6);
  animation: error-pulse 3s infinite;
}

@keyframes error-pulse {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
  }

  50% {
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
  }
}

.node-errors {
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid rgba(255, 68, 68, 0.4);
  border-radius: 4px;
  padding: 0.5rem;
  margin: 0.5rem 0;
}

.error-header {
  color: #ff6666;
  font-weight: bold;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.error-pods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.error-pod {
  background: rgba(255, 68, 68, 0.3);
  color: #ffaaaa;
  font-size: 0.6rem;
  font-family: 'Courier New', monospace;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Node Footer */
.node-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 255, 65, 0.15);
}

.footer-item {
  background: rgba(0, 255, 65, 0.08);
  color: #666;
  font-size: 0.6rem;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

/* Node Card Layout Extensions */
.node-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 65, 0.1);
}

.node-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.node-info-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.node-info-value {
  font-size: 0.8rem;
  color: var(--neon-cyan);
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

.node-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 255, 65, 0.2);
}

.condition-item {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: bold;
}

.condition-item.true {
  background: rgba(255, 68, 68, 0.15);
  color: #ff6666;
  border: 1px solid rgba(255, 68, 68, 0.4);
}

.condition-item.false {
  background: rgba(0, 255, 65, 0.1);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.2);
}

/* Specific case for Ready condition */
.condition-item.Ready.true {
  background: rgba(0, 255, 65, 0.2);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

.condition-item.Ready.false {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border: 1px solid #ff4444;
}

/* Responsive */
@media (max-width: 768px) {
  .logo {
    font-size: 2.5rem;
    letter-spacing: 0.2rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .container {
    padding: 1rem;
  }

  .terminal {
    padding: 1.5rem;
  }
}

/* Section Tabs Navigation */
.section-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 8px;
  flex-wrap: wrap;
}

.tab-separator {
  width: 2px;
  height: 30px;
  background: rgba(0, 255, 65, 0.2);
  margin: 0 0.5rem;
  align-self: center;
}

@media (max-width: 768px) {
  .tab-separator {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0;
  }
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 6px;
  color: var(--neon-green);
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: rgba(0, 255, 65, 0.1);
  border-color: var(--neon-green);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: rgba(0, 255, 65, 0.2);
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.tab-icon {
  font-size: 1.1rem;
}

/* External Links Colors */
.ext-link.grafana:hover {
  border-color: #ff6b35;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.ext-link.argocd:hover {
  border-color: #ff00ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.ext-link.homepage:hover {
  border-color: #00bfff;
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.ext-link.o2:hover {
  border-color: #ffa500;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
}

/* Chat Container */
.chat-container {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--neon-green);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 300px);
  min-height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 200px;
}

.chat-message {
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease;
}

.chat-message .message-content {
  padding: 1rem;
  border-radius: 8px;
  max-width: 90%;
}

.chat-message.user .message-content {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  margin-left: auto;
}

.chat-message.bot .message-content {
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid var(--neon-green);
}

.chat-message code {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: var(--neon-cyan);
}

.chat-message h4 {
  color: var(--neon-green);
  margin: 0.5rem 0;
}

.chat-input-container {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(0, 255, 65, 0.3);
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 6px;
  color: var(--neon-green);
  font-family: 'Courier New', monospace;
}

.chat-input:focus {
  outline: none;
  border-color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.chat-input::placeholder {
  color: rgba(0, 255, 65, 0.4);
}

.chat-send-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
  border: none;
  border-radius: 6px;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat Avatar */
.chat-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.25rem;
  border: 1px solid var(--neon-green);
}

.bot-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* ===================== */
/* BACKUPS STYLES        */
/* ===================== */

/* Job status badges */
.job-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: bold;
  cursor: help;
}

.job-badge.succeeded {
  background: rgba(0, 255, 65, 0.3);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

.job-badge.failed {
  background: rgba(255, 68, 68, 0.3);
  color: #ff4444;
  border: 1px solid #ff4444;
}

.job-badge.running {
  background: rgba(0, 255, 255, 0.3);
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
  }

  50% {
    opacity: 0.7;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
  }
}

/* Schedule display */
.schedule {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  background: rgba(0, 255, 65, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  color: var(--neon-green);
}

/* Last run column */
.last-run {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--neon-cyan);
}

/* Recent jobs column */
.recent-jobs {
  display: flex;
  gap: 4px;
}

/* Status badges for backups */
.status-badge.running {
  background: rgba(0, 255, 255, 0.2);
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
}

.status-badge.suspended {
  background: rgba(255, 170, 0, 0.2);
  color: #ffaa00;
  border: 1px solid #ffaa00;
}

.status-badge.idle {
  background: rgba(0, 255, 65, 0.2);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

/* ===================== */
/* NOTIFICATION SYSTEM   */
/* ===================== */

.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.2), 0 0 40px rgba(0, 255, 255, 0.1);
  animation: slideIn 0.3s ease-out;
  pointer-events: auto;
  position: relative;
  backdrop-filter: blur(10px);
}

.notification.warning {
  border-color: #ffaa00;
  box-shadow: 0 4px 20px rgba(255, 170, 0, 0.2), 0 0 40px rgba(255, 170, 0, 0.1);
}

.notification.error {
  border-color: #ff4444;
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.3), 0 0 40px rgba(255, 68, 68, 0.1);
}

.notification.success {
  border-color: var(--neon-green);
  box-shadow: 0 4px 20px rgba(0, 255, 65, 0.2), 0 0 40px rgba(0, 255, 65, 0.1);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.notification-title {
  font-weight: bold;
  color: var(--neon-cyan);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.notification.warning .notification-title {
  color: #ffaa00;
}

.notification.error .notification-title {
  color: #ff4444;
}

.notification.success .notification-title {
  color: var(--neon-green);
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.notification-close:hover {
  color: var(--text-primary);
}

.notification-body {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.notification-source {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 8px;
  text-transform: uppercase;
}

.notification.hiding {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* WebSocket Connection Status */
.ws-status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--neon-cyan);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ws-status:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.ws-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #888;
}

.ws-indicator.connected {
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 2s infinite;
}

.ws-indicator.disconnected {
  background: #ff4444;
}

.ws-indicator.connecting {
  background: #ffaa00;
  animation: blink 0.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Ingress Links */
.ingress-link {
  color: var(--neon-cyan);
  text-decoration: none;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.ingress-link:hover {
  color: var(--neon-green);
  text-shadow: 0 0 8px var(--neon-green);
}

.ingress-link:visited {
  color: var(--neon-magenta);
}

/* Table Search & Sort */
.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  position: relative;
}

.search-input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  padding: 8px 12px 8px 35px;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  width: 100%;
  max-width: 300px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 1rem;
}

.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.sortable:hover {
  color: var(--neon-green);
  text-shadow: 0 0 8px var(--neon-green);
}

.sort-icon {
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.6;
}

.sortable:hover .sort-icon {
  opacity: 1;
}

/* ============================================
   METRICS SECTION
   ============================================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.metric-card {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
  transform: translateY(-3px);
}

.metric-card.alert-critical {
  border-color: #ff4444;
  animation: pulse-critical 2s infinite;
}

@keyframes pulse-critical {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
  }

  50% {
    box-shadow: 0 0 25px rgba(255, 68, 68, 0.6);
  }
}

.metric-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--neon-green);
  font-family: 'Courier New', monospace;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-top: 0.5rem;
}

.metric-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
}

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

.metric-bar-fill.cpu {
  background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
}

.metric-bar-fill.memory {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
}

/* ============================================
   ALERTS SECTION
   ============================================ */

.alerts-list {
  padding: 1rem;
}

.alert-group {
  margin-bottom: 1.5rem;
}

.alert-group h4 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-group.critical h4 {
  color: #ff4444;
}

.alert-group.warning h4 {
  color: #ffaa00;
}

.alert-group.info h4 {
  color: var(--neon-cyan);
}

.alert-card {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid;
}

.alert-card.critical {
  border-left-color: #ff4444;
}

.alert-card.warning {
  border-left-color: #ffaa00;
}

.alert-card.info {
  border-left-color: var(--neon-cyan);
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.alert-name {
  font-weight: bold;
  color: var(--text-primary);
}

.alert-state {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.alert-state.firing {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
}

.alert-state.pending {
  background: rgba(255, 170, 0, 0.2);
  color: #ffaa00;
}

.alert-summary {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.alert-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.no-alerts {
  text-align: center;
  padding: 3rem;
  color: var(--neon-green);
}

.success-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* ============================================
   BADGE STYLES
   ============================================ */

.badge {
  display: inline-block;
  background: #ff4444;
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.3rem;
  min-width: 16px;
  text-align: center;
}

/* ============================================
   EXPORT DROPDOWN
   ============================================ */

.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(10, 10, 15, 0.98);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-width: 150px;
  margin-top: 4px;
}

.export-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-btn:hover {
  background: rgba(0, 255, 255, 0.1);
  color: var(--neon-cyan);
}

.export-btn:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   ERROR STATE
   ============================================ */

.error-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.error-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.retry-btn {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: 'Courier New', monospace;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* ============================================
   QUOTAS SECTION
   ============================================ */

.quotas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.quota-card {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quota-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
  transform: translateY(-5px);
}

.quota-card.full-width {
  grid-column: 1 / -1;
  align-items: stretch;
}

.quota-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  justify-content: center;
}

.quota-card.full-width .quota-header {
  justify-content: flex-start;
}

.quota-icon {
  font-size: 1.5rem;
}

.quota-title {
  color: var(--neon-cyan);
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

/* Semi-Circle Gauge */
.quota-gauge-container {
  position: relative;
  width: 200px;
  height: 120px;
  /* Half of width + padding */
  overflow: hidden;
}

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

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
  stroke-linecap: round;
}

.gauge-fill {
  fill: none;
  stroke: var(--neon-green);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}

.quota-gauge[data-value="high"] .gauge-fill {
  stroke: #ff4444;
}

.quota-gauge[data-value="medium"] .gauge-fill {
  stroke: #ffaa00;
}

.gauge-value {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}

/* Storage Bar */
.storage-bar-container {
  width: 100%;
}

.storage-info {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.storage-info span {
  color: var(--neon-green);
  font-weight: bold;
}

.storage-progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  width: 0%;
  border-radius: 6px;
  transition: width 1s ease-out;
  position: relative;
}

.storage-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
      rgba(255, 255, 255, 0.2) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0.2) 75%,
      transparent 75%,
      transparent);
  background-size: 20px 20px;
  animation: stripe-move 1s linear infinite;
  opacity: 0.3;
}

@keyframes stripe-move {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 20px 20px;
  }
}

.quota-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {

  /* Global Layout */
  .container {
    padding: 1rem 0.5rem;
    width: 100%;
    margin: 0;
  }

  /* Header */
  .header {
    padding: 2rem 0;
  }

  .logo {
    font-size: 3rem;
  }

  .theme-toggle {
    top: 0.5rem;
    right: 0.5rem;
    width: 40px;
    height: 40px;
  }

  /* Quick Nav */
  .quick-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1rem;
  }

  .quick-stats {
    gap: 1rem;
    justify-content: space-between;
  }

  .external-links {
    justify-content: center;
  }

  .ext-link {
    flex: 1;
    justify-content: center;
  }

  /* Section Tabs - Scrollable */
  .section-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.5rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    /* smooth scrolling on iOS */
    gap: 0.5rem;
  }

  .tab-btn {
    flex: 0 0 auto;
    /* Don't shrink */
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  /* Grids - Stack vertically */
  .stats-grid,
  .argocd-stats,
  .status-grid,
  .nodes-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
    /* Single column */
    gap: 1rem;
  }

  /* Tables */
  .issues-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .issues-table th,
  .issues-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    /* Prevent wrapping in cells, force scroll */
  }

  /* Chat */
  .chat-container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    /* Adjustment for mobile to account for address bar/keyboard */
    max-height: 600px;
  }

  .chat-messages {
    flex: 1;
    height: auto;
  }

  .chat-input-container {
    padding: 0.5rem;
  }

  .chat-input {
    font-size: 16px;
    /* prevent zoom on iOS */
  }

  /* Footer */
  .footer {
    padding: 2rem 1rem;
    font-size: 0.7rem;
  }

  /* Notifications */
  .notification-container {
    top: auto;
    bottom: 80px;
    /* Above bottom nav/ws status */
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* ============================================
   NEWS FEED STYLES
   ============================================ */

/* News Grid Layout */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* News Card */
.news-card {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.news-card:hover::before {
  left: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

/* News Header */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.news-source-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--dark-bg);
  letter-spacing: 0.05rem;
}

.news-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* News Title */
.news-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-title a {
  color: var(--neon-green);
  text-decoration: none;
  transition: all 0.3s ease;
}

.news-title a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* News Description */
.news-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* News Footer */
.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.news-score {
  font-size: 0.8rem;
  color: var(--neon-magenta);
  font-weight: bold;
}

.news-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 3px;
  color: var(--neon-green);
}

/* Responsive News Grid */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* List Mode Styles */
.news-grid.list-mode {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-card.list-mode {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--neon-cyan);
}

.news-card.list-mode :is(.news-description, .news-footer) {
  display: none;
}

.news-card.list-mode .news-header {
  margin-bottom: 0;
  width: 180px;
  flex-shrink: 0;
}

.news-card.list-mode .news-title {
  margin-bottom: 0;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.news-card.list-mode .news-time {
  width: 80px;
  text-align: right;
}

/* Inline Mode Styles */
.news-grid.inline-mode {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.news-card.inline-mode {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid var(--neon-cyan);
  border-top: none;
  border-right: none;
  border-bottom: none;
  background: rgba(0, 0, 0, 0.4);
}

.news-card.inline-mode :is(.news-description, .news-footer, .news-time) {
  display: none;
}

.news-card.inline-mode .news-header {
  margin-bottom: 0;
  width: auto;
  flex-shrink: 0;
}

.news-card.inline-mode .news-source-badge {
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
}

.news-card.inline-mode .news-title {
  margin-bottom: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

/* Compact News Stats */
.news-stats-compact {
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
}

.news-stats-compact .stat-box {
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
}

.news-stats-compact .stat-value {
  font-size: 1.3rem;
  line-height: 1.2;
}

.news-stats-compact .stat-label {
  font-size: 0.6rem;
  margin-top: 0.2rem;
  letter-spacing: 0.05rem;
}

/* Introviews Mode */
.news-grid.introviews-mode {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-card.introviews-mode {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--neon-cyan);
  border-radius: 6px;
}

.news-card.introviews-mode .news-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.news-card.introviews-mode .news-description {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 1;
  margin-bottom: 0.75rem;
  max-width: 100%;
}

.news-card.introviews-mode .news-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

/* Theme Switcher Styles */
.theme-dropdown {
  position: relative;
  display: inline-block;
}

.theme-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--darker-bg);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  margin-top: 5px;
}

.theme-option {
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

.theme-option:hover {
  background: rgba(0, 255, 255, 0.1);
}

.theme-option.active {
  color: var(--neon-cyan);
  background: rgba(0, 255, 255, 0.05);
}

.chevron {
  font-size: 0.8em;
  margin-left: 5px;
  opacity: 0.7;
}

/* ============================================
   INGRESS LINKS STYLES
   ============================================ */

/* Ingress Table Styles */
.data-table.ingress-table td.ingress-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Clickable Ingress Links */
a.ingress-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'Courier New', 'Fira Code', monospace;
  transition: all 0.2s ease;
  position: relative;
}

a.ingress-link::before {
  content: "🔒";
  font-size: 0.75rem;
}

a.ingress-link:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
  transform: translateY(-1px);
}

a.ingress-link:active {
  transform: translateY(0);
}

/* Namespace Badge */
.namespace-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 0, 255, 0.1);
  border: 1px solid var(--neon-magenta);
  border-radius: 4px;
  color: var(--neon-magenta);
  font-size: 0.8rem;
}

/* Light theme adjustments */
:root[data-theme="light"] a.ingress-link {
  background: rgba(0, 136, 170, 0.1);
  border-color: #0088aa;
  color: #0088aa;
}

:root[data-theme="light"] a.ingress-link:hover {
  background: rgba(0, 136, 170, 0.2);
  box-shadow: 0 0 8px rgba(0, 136, 170, 0.3);
}

:root[data-theme="light"] .namespace-badge {
  background: rgba(170, 0, 170, 0.1);
  border-color: #aa00aa;
  color: #aa00aa;
}