/* AetherWorks Control Plane — Dark theme */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1f2933;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

/* Layout */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-right: 32px;
  text-decoration: none;
}
.navbar-nav {
  display: flex;
  gap: 4px;
  list-style: none;
  flex: 1;
}
.navbar-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s;
}
.navbar-nav a:hover { background: var(--bg-hover); color: var(--text); }
.navbar-nav a.active { background: var(--bg-hover); color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-title { font-size: 14px; font-weight: 600; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
tr:hover { background: var(--bg-hover); }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}
.badge-green { background: rgba(63,185,80,0.15); color: var(--green); }
.badge-yellow { background: rgba(210,153,34,0.15); color: var(--yellow); }
.badge-red { background: rgba(248,81,73,0.15); color: var(--red); }
.badge-blue { background: rgba(88,166,255,0.15); color: var(--accent); }
.badge-purple { background: rgba(188,140,255,0.15); color: var(--purple); }

/* Login */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
}
.login-title { font-size: 20px; font-weight: 600; margin-bottom: 24px; text-align: center; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { min-height: 80px; resize: vertical; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--bg-hover); }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Messages */
.message-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.message-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.message-channel {
  display: inline-block;
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 8px;
  font-size: 11px;
}
.message-content { font-size: 13px; }

/* Section heading */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.subsection-title {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-muted);
}

/* Pre */
pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-nav { flex-wrap: wrap; }
  .container { padding: 16px; }
}
