:root {
  /* Ultra-Professional Cyber Ops Palette */
  --bg-deep: #0a0e14;
  --bg-panel: #131921;
  --bg-panel-light: #1c252f;
  --accent-primary: #00f2ff; /* Cyber Cyan */
  --accent-secondary: #7000ff; /* Neon Purple */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(0, 242, 255, 0.1);
  --border-glow: rgba(0, 242, 255, 0.3);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --glass: rgba(19, 25, 33, 0.9);
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', system-ui, sans-serif;
  height: 100vh;
  width: 100vw;
  overflow: hidden; /* Important: Sidebar and Content scroll independently */
}

/* Typography */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 0.15em;
}

/* Grid Layout */
.shell-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; padding: 0 8px; }
.brand-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 900; color: #fff;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

nav { display: flex; flex-direction: column; gap: 4px; }
nav a {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 12px;
}
nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
nav a.active {
  background: rgba(0, 242, 255, 0.08);
  color: var(--accent-primary);
  border-left: 3px solid var(--accent-primary);
}

/* Main Content Wrapper */
.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(112, 0, 255, 0.03), transparent);
}

header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--glass);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 5;
}

main { padding: 32px; display: flex; flex-direction: column; gap: 24px; }

/* Dashboard Metrics */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.metric {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 20px; border-radius: 12px;
}
.metric span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.metric strong { display: block; font-size: 1.5rem; margin-top: 8px; font-family: 'JetBrains Mono', monospace; }

/* Dashboard Sections / Tabs */
.tab-content { display: none; width: 100%; gap: 24px; flex-direction: column; }
.tab-content.active { display: flex; }

/* Panel / Cards */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* Forms */
.grid { display: grid; gap: 16px; }
input, select {
  background: var(--bg-panel-light);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
  color: #fff; font-size: 0.9rem;
}
input:focus { border-color: var(--accent-primary); outline: none; }

button {
  background: var(--accent-primary); color: #000;
  border: none; border-radius: 8px;
  padding: 12px 24px; font-weight: 700;
  cursor: pointer; transition: 0.2s;
}
button:hover { opacity: 0.9; box-shadow: 0 0 15px rgba(0, 242, 255, 0.3); }
button.secondary { background: var(--bg-panel-light); color: #fff; border: 1px solid var(--border); }

/* Console / Results */
pre {
  background: #05070a; border-radius: 8px; padding: 20px;
  color: #50fa7b; font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; line-height: 1.5; border-left: 4px solid var(--accent-primary);
  max-height: 400px; overflow: auto;
}

/* Data Tables */
.table { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.5fr auto;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px; border-radius: 8px; align-items: center; font-size: 0.85rem;
}
.status-tag {
  padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700;
}
.online { color: var(--success); background: rgba(16, 185, 129, 0.1); }
.offline { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

/* Login Panel */
#login-panel {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg-deep); z-index: 1000;
}
.login-box {
  width: 100%; max-width: 400px; padding: 40px;
  background: var(--bg-panel); border-radius: 20px; border: 1px solid var(--border);
  text-align: center;
}

.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Utility */
.danger-panel { border-color: rgba(239, 68, 68, 0.3); }
