/* ═══════════════════════════════════════════════════════════════════════════
   MUSEKA — Dark-Ops Console Theme
   Bloomberg Terminal × KASM Workspaces × Music Studio Console
   Electric cyan on void black. Dense data. Every pixel = operational status.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-void: #080b12;
  --bg-primary: #0d1117;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2035;
  --bg-elevated: #1f2937;
  --bg-input: #0b0f18;
  --border: #1f2937;
  --border-subtle: #161d2d;
  --border-hover: #2d3a50;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-faint: #334155;

  /* Primary accent — electric cyan */
  --accent: #00e5ff;
  --accent-dim: #00b8d4;
  --accent-glow: rgba(0, 229, 255, 0.12);
  --accent-glow-strong: rgba(0, 229, 255, 0.25);
  --accent-bg: rgba(0, 229, 255, 0.06);

  /* Backward compat alias */
  --amber: var(--accent);
  --amber-dim: var(--accent-dim);
  --amber-glow: var(--accent-glow);
  --amber-glow-strong: var(--accent-glow-strong);
  --amber-bg: var(--accent-bg);

  --green: #00ff88;
  --green-dim: #00d97a;
  --green-bg: rgba(0, 255, 136, 0.08);
  --red: #ef4444;
  --red-dim: #dc2626;
  --red-bg: rgba(239, 68, 68, 0.08);
  --yellow: #fbbf24;
  --yellow-dim: #f59e0b;
  --yellow-bg: rgba(251, 191, 36, 0.08);
  --purple: #a78bfa;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.06);

  --sidebar-width: 220px;
  --navbar-height: 48px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-primary); }

::selection { background: var(--accent-glow-strong); color: var(--text-primary); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ═══════════════════════════════════════════════════════════════════════════
   TOP NAVBAR — Sticky, spans full width
   ═══════════════════════════════════════════════════════════════════════════ */

.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

.navbar-logo .logo-accent {
  color: var(--accent);
}

.pipeline-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  background: var(--accent-bg);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.pipeline-status-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-clock {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.navbar-user:hover { background: var(--bg-elevated); }

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-void);
  flex-shrink: 0;
}

.navbar-username {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.user-dropdown {
  position: relative;
}

.user-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
}

.user-dropdown-menu.active { display: block; }

.user-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.user-dropdown-menu a:hover {
  background: var(--accent-bg);
  color: var(--text-primary);
}

.user-dropdown-menu .dropdown-danger:hover {
  background: var(--red-bg);
  color: var(--red);
}

/* Hamburger for mobile */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main
   ═══════════════════════════════════════════════════════════════════════════ */

.layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
  flex-shrink: 0;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  display: none; /* Brand is in navbar now */
}

.sidebar-sep {
  height: 1px;
  background: linear-gradient(90deg, var(--accent-glow-strong), transparent);
  margin: 0 1rem 0.75rem 1rem;
  display: none;
}

.sidebar-nav {
  list-style: none;
  flex: 1;
  padding: 0 0.5rem;
}

.sidebar-nav li {
  animation: sidebarFadeIn 0.4s ease both;
}
.sidebar-nav li:nth-child(1) { animation-delay: 0.02s; }
.sidebar-nav li:nth-child(2) { animation-delay: 0.04s; }
.sidebar-nav li:nth-child(3) { animation-delay: 0.06s; }
.sidebar-nav li:nth-child(4) { animation-delay: 0.08s; }
.sidebar-nav li:nth-child(5) { animation-delay: 0.10s; }
.sidebar-nav li:nth-child(6) { animation-delay: 0.12s; }
.sidebar-nav li:nth-child(7) { animation-delay: 0.14s; }
.sidebar-nav li:nth-child(8) { animation-delay: 0.16s; }
.sidebar-nav li:nth-child(9) { animation-delay: 0.18s; }

@keyframes sidebarFadeIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.775rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
}

.sidebar-nav a .nav-icon {
  width: 16px;
  height: 16px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

/* Legacy data-icon support */
.sidebar-nav a::before {
  content: attr(data-icon);
  font-size: 0.85rem;
  width: 1rem;
  text-align: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.sidebar-nav a[data-icon=""]::before,
.sidebar-nav a:not([data-icon])::before {
  display: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text-primary);
  background: var(--accent-bg);
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
  opacity: 1;
}

.sidebar-nav a.active {
  background: linear-gradient(90deg, var(--accent-bg), transparent);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  display: none; /* Sign out moved to navbar dropdown */
}

.sidebar-footer a {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.sidebar-footer a:hover { color: var(--red-dim); }

/* Section labels in sidebar */
.sidebar-section-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  padding: 0.75rem 0.75rem 0.35rem;
  font-weight: 600;
}

/* ── Main Content ── */
.main {
  flex: 1;
  padding: 2rem 2.5rem;
  margin-left: var(--sidebar-width);
  max-width: 1200px;
  animation: mainFadeIn 0.4s ease;
}

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

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS — KPI Metrics
   ═══════════════════════════════════════════════════════════════════════════ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card:hover::before { opacity: 1; }

.card-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.1;
}

/* KPI card with colored accent bar */
.kpi-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--accent);
}

.kpi-card[data-color="green"] { border-left-color: var(--green); }
.kpi-card[data-color="yellow"] { border-left-color: var(--yellow); }
.kpi-card[data-color="red"] { border-left-color: var(--red); }
.kpi-card[data-color="cyan"] { border-left-color: var(--accent); }

.kpi-card .card-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.kpi-card .card-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.1;
}

.kpi-card .card-trend {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  margin-top: 0.35rem;
  color: var(--text-muted);
}

.kpi-card .card-trend .trend-up { color: var(--green); }
.kpi-card .card-trend .trend-down { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */

.table-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th {
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

td .mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

tr:last-child td { border-bottom: none; }

tr { transition: background 0.15s; }
tr:hover td {
  background: var(--accent-bg);
  color: var(--text-primary);
}

/* Sortable header */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-green { background: var(--green-bg); color: var(--green); }
.badge-green::before { background: var(--green); box-shadow: 0 0 6px var(--green); }

.badge-red { background: var(--red-bg); color: var(--red); }
.badge-red::before { background: var(--red); box-shadow: 0 0 6px var(--red); }

.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-yellow::before { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }

.badge-cyan { background: var(--accent-bg); color: var(--accent); }
.badge-cyan::before { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.badge-muted { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-muted::before { background: var(--text-muted); }

/* Role badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.role-ADMIN { background: rgba(239, 68, 68, 0.12); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }
.role-MANAGER { background: rgba(251, 191, 36, 0.12); color: var(--yellow); border: 1px solid rgba(251, 191, 36, 0.2); }
.role-QA_REVIEWER { background: rgba(0, 229, 255, 0.12); color: var(--accent); border: 1px solid rgba(0, 229, 255, 0.2); }
.role-VIEWER { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */

input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
textarea,
select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Search input */
.search-input {
  position: relative;
}

.search-input input {
  padding-left: 2rem;
}

.search-input::before {
  content: '\1F50D';
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  color: var(--bg-void);
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #33ebff, var(--accent));
  box-shadow: 0 2px 12px var(--accent-glow-strong);
  transform: translateY(-1px);
  color: var(--bg-void);
}

.btn-danger {
  background: var(--red-bg);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--red);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TAB NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab-nav button,
.tab-nav a {
  padding: 0.6rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

.tab-nav button:hover,
.tab-nav a:hover {
  color: var(--text-primary);
  background: var(--accent-bg);
}

.tab-nav button.active,
.tab-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-content {
  display: none;
  animation: tabFadeIn 0.3s ease;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   SECRETS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.secret-category {
  margin-bottom: 1.25rem;
  animation: staggerIn 0.4s ease both;
}

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

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: all 0.2s;
}

.category-header:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.category-body {
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg-secondary);
}

.secret-row {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.secret-row:last-child { border-bottom: none; }
.secret-row:hover { background: var(--accent-bg); }

.secret-key {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
}

.secret-value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.secret-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.secret-input { width: 180px; }

.masked { color: var(--text-faint); letter-spacing: 0.1em; }
.set-indicator { color: var(--green); font-size: 0.7rem; font-family: var(--font-mono); }
.unset-indicator { color: var(--red-dim); font-size: 0.7rem; font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.pagination a, .pagination span {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--accent-bg);
  border-color: var(--accent-dim);
  color: var(--text-primary);
  text-decoration: none;
}

.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-void);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════════════════ */

.flash {
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: flashIn 0.3s ease;
}

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

.flash-success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, 0.15);
}

.flash-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.flash-dismiss {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  font-size: 0.8rem;
}
.flash-dismiss:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Animated grid background */
.login-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Radial glow */
.login-container::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 380px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: loginAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

@keyframes loginAppear {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 0.15rem;
}

.login-brand h1 .logo-cyan {
  color: var(--accent);
}

.login-brand h1 .logo-white {
  color: var(--text-primary);
}

.login-brand p {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Equalizer bars — now cyan */
.eq-bars {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 1rem;
  height: 16px;
  align-items: flex-end;
}

.eq-bars span {
  width: 3px;
  background: var(--accent-dim);
  border-radius: 1px;
  animation: eqBounce 1.2s ease-in-out infinite;
}

.eq-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq-bars span:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.eq-bars span:nth-child(3) { height: 14px; animation-delay: 0.3s; }
.eq-bars span:nth-child(4) { height: 8px; animation-delay: 0.45s; }
.eq-bars span:nth-child(5) { height: 12px; animation-delay: 0.6s; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Legacy support */
.login-box > h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.form-group .btn {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTERS
   ═══════════════════════════════════════════════════════════════════════════ */

.filters {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.filters select, .filters input {
  width: auto;
  min-width: 140px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-backdrop.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.modal textarea {
  min-height: 200px;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAIL PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.detail-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.detail-section h3 {
  font-family: var(--font-body);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.35rem 0.75rem;
}

dt {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

dd {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Song hero section */
.song-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.song-hero-art {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-elevated));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent-dim);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.song-hero-info {
  flex: 1;
}

.song-hero-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.song-hero-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITY FEED
   ═══════════════════════════════════════════════════════════════════════════ */

.activity-feed {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  max-height: 360px;
  overflow-y: auto;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
  font-size: 0.775rem;
}

.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--accent-bg); }

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.feed-dot-running { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: pulse 2s infinite; }
.feed-dot-completed { background: var(--green); box-shadow: 0 0 4px var(--green); }
.feed-dot-failed { background: var(--red); box-shadow: 0 0 4px var(--red); }

.feed-text {
  flex: 1;
  color: var(--text-secondary);
  line-height: 1.4;
}

.feed-stage {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
}

.feed-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   USER CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.user-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.user-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.user-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-void);
  flex-shrink: 0;
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.user-card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.user-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.user-status-active { background: var(--green); box-shadow: 0 0 4px var(--green); }
.user-status-suspended { background: var(--red); }
.user-status-invited { background: var(--yellow); animation: pulse 2s infinite; }

/* ═══════════════════════════════════════════════════════════════════════════
   DONUT CHART CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.donut-chart-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart-container canvas {
  max-width: 200px;
  max-height: 200px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.profile-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bg-void);
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.profile-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD — Pipeline, Grid, Comments, Status Bar
   ═══════════════════════════════════════════════════════════════════════════ */

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dash-section h2 { margin-bottom: 0.75rem; }

/* Pipeline funnel */
.pipeline-funnel {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  min-height: 100px;
}

.pipeline-stage {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.pipeline-bar {
  width: 100%;
  max-width: 70px;
  min-height: 20px;
  height: calc(16px + var(--pct) * 0.8);
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-radius: 3px 3px 2px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: barGrow 0.5s ease both;
}

@keyframes barGrow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

.pipeline-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bg-void);
}

.pipeline-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* Comments list */
.comment-list {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}

.comment-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.comment-item:last-child { border-bottom: none; }
.comment-item:hover { background: var(--accent-bg); }

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

.comment-author {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.comment-platform {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.comment-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.2rem;
}

.comment-reply {
  font-size: 0.7rem;
  color: var(--accent-dim);
  padding-left: 0.75rem;
}

.comment-song {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: var(--font-mono);
}

/* Status bar */
.status-bar {
  display: flex;
  gap: 1.5rem;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-ok {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.status-dot-warn {
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot-active {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   HEALTH PAGE — Workflow status
   ═══════════════════════════════════════════════════════════════════════════ */

.health-status-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.health-big-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
}

.health-big-badge.online {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.health-big-badge.offline {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAGGER ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.card-grid .card,
.card-grid .kpi-card,
.table-wrap,
.secret-category {
  animation: staggerIn 0.35s ease both;
}

.card-grid .card:nth-child(1),
.card-grid .kpi-card:nth-child(1) { animation-delay: 0.03s; }
.card-grid .card:nth-child(2),
.card-grid .kpi-card:nth-child(2) { animation-delay: 0.06s; }
.card-grid .card:nth-child(3),
.card-grid .kpi-card:nth-child(3) { animation-delay: 0.09s; }
.card-grid .card:nth-child(4),
.card-grid .kpi-card:nth-child(4) { animation-delay: 0.12s; }
.card-grid .card:nth-child(5),
.card-grid .kpi-card:nth-child(5) { animation-delay: 0.15s; }

.secret-category:nth-child(2) { animation-delay: 0.03s; }
.secret-category:nth-child(3) { animation-delay: 0.06s; }
.secret-category:nth-child(4) { animation-delay: 0.09s; }
.secret-category:nth-child(5) { animation-delay: 0.12s; }
.secret-category:nth-child(6) { animation-delay: 0.15s; }
.secret-category:nth-child(7) { animation-delay: 0.18s; }
.secret-category:nth-child(8) { animation-delay: 0.21s; }
.secret-category:nth-child(9) { animation-delay: 0.24s; }

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .top-navbar {
    padding: 0 0.75rem;
  }

  .hamburger-menu { display: block; }

  .pipeline-status-pill { display: none; }
  .navbar-clock { display: none; }

  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    z-index: 45;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--navbar-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: 44;
  }

  .sidebar-overlay.active { display: block; }

  .main {
    margin-left: 0;
    padding: 1.25rem 1rem;
  }

  .detail-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .secret-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .login-box { width: calc(100% - 2rem); margin: 0 1rem; }
  .status-bar { flex-wrap: wrap; gap: 0.75rem; }
  .pipeline-funnel { flex-wrap: wrap; }
  .user-grid { grid-template-columns: 1fr; }

  .song-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .song-hero-meta { justify-content: center; }

  .profile-card {
    flex-direction: column;
    text-align: center;
  }
}
