/* ════════════════════════════════════════════════════════
   admin.css — shared design system
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Dark (default) ─── */
:root {
  --bg:          #0d0f18;
  --s1:          #12151f;
  --s2:          #191c2c;
  --s3:          #1f2236;
  --border:      #252840;
  --border-2:    #2e3252;
  --text:        #dde1f5;
  --text-2:      #7a80a4;
  --text-3:      #5c6490;
  --accent:      #6c5ce7;
  --accent-bg:   rgba(108,92,231,0.11);
  --accent-glow: rgba(108,92,231,0.30);
  --green:       #00c896;
  --green-bg:    #00180f;
  --green-bdr:   #003c22;
  --green-text:  #a7f3d0;
  --amber:       #f4a935;
  --red:         #e06c75;
  --font-ui:     'Outfit', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --header-h:    48px;
}

/* ─── Light overrides ─── */
[data-theme="light"] {
  --bg:          #f4f5fa;
  --s1:          #ffffff;
  --s2:          #ecedf5;
  --s3:          #e4e6f0;
  --border:      #d0d3e8;
  --border-2:    #bfc3db;
  --text:        #1b1d2e;
  --text-2:      #464c78;
  --text-3:      #7880a8;
  --accent:      #5b4fd6;
  --accent-bg:   rgba(91,79,214,0.09);
  --accent-glow: rgba(91,79,214,0.22);
  --green:       #00a87e;
  --green-bg:    #e8faf5;
  --green-bdr:   #a3e8d0;
  --green-text:  #005c45;
  --amber:       #b86b00;
  --red:         #c0404a;
}

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

/* ─── Base ─── */
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Header ─── */
#app-header {
  height: var(--header-h);
  background: var(--s1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  flex-shrink: 0;
  z-index: 20;
  position: sticky;
  top: 0;
}

.header-logo {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.1px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo-icon {
  width: 24px; height: 24px;
  background: var(--accent-bg);
  border: 1px solid rgba(108,92,231,0.25);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.header-spacer { flex: 1; }

/* ─── Navigation links ─── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1px;
}
.nav-link {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-ui);
  color: var(--text-3);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-link:hover  { color: var(--text-2); background: var(--s3); }
.nav-link.active { color: var(--text);   background: var(--s2); }
.nav-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
  flex-shrink: 0;
}
.nav-link.active .nav-dot { display: block; }

/* ─── Theme toggle button ─── */
.theme-toggle {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--s2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--border-2);
  color: var(--text-2);
  background: var(--s3);
}

/* ─── Connection badge ─── */
.conn-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-3);
}
.conn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background 0.4s, box-shadow 0.4s;
  flex-shrink: 0;
}
.conn-dot.on  { background: var(--green); box-shadow: 0 0 7px rgba(0,200,150,0.6); }
.conn-dot.off { background: var(--red); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
