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

:root {
  --bg:        #0a0a0a;
  --panel:     #111111;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.12);
  --accent:    #FFD024;
  --accent-d:  #e6b800;
  --muted:     #6b7280;
  --text:      #e5e7eb;
  --text-dim:  #9ca3af;
  --danger:    #ef4444;
  --success:   #22c55e;
  --blue:      #3b82f6;
  --radius:    10px;
  --sidebar-w: 220px;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.sidebar-section { margin-bottom: 20px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 8px;
  margin-bottom: 6px;
}
.sidebar ul { list-style: none; }
.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.sidebar ul li a i { width: 16px; text-align: center; font-size: 13px; }
.sidebar ul li a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar ul li a.active { background: rgba(255,208,36,0.1); color: var(--accent); }
.sidebar ul li a.active i { color: var(--accent); }

.sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sidebar-version { font-size: 11px; color: var(--muted); padding: 0 8px; }

/* ─── Page layout ─────────────────────────────────────────────────────────── */
.page {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
}

/* ─── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.topbar-label { display: block; font-size: 20px; font-weight: 700; color: #fff; }
.topbar-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ─── Monitor strip ───────────────────────────────────────────────────────── */
.monitor-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.monitor-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.monitor-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.monitor-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.monitor-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.monitor-bar.bar-blue { background: var(--blue); }
.monitor-bar.bar-green { background: var(--success); }
.monitor-val { font-size: 13px; font-weight: 600; color: var(--text); }

/* ─── Section title ───────────────────────────────────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.badge {
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ─── Server grid ─────────────────────────────────────────────────────────── */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.server-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s;
}
.server-card:hover { border-color: var(--border-h); }

.sc-top { display: flex; align-items: center; gap: 12px; }
.sc-icon {
  width: 38px; height: 38px;
  background: rgba(255,208,36,0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
}
.sc-info { flex: 1; min-width: 0; }
.sc-name { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-host { font-size: 12px; color: var(--muted); margin-top: 2px; }

.sc-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-online { background: rgba(34,197,94,0.1); color: var(--success); }
.status-online .status-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-idle { background: rgba(255,255,255,0.05); color: var(--muted); }
.status-idle .status-dot { background: var(--muted); }

.sc-divider { height: 1px; background: var(--border); margin: 14px 0; }
.sc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon { font-size: 40px; color: rgba(255,255,255,0.1); margin-bottom: 14px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--muted); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-yellow {
  background: rgba(255,208,36,0.12);
  color: var(--accent);
  border: 1px solid rgba(255,208,36,0.2);
}
.btn-yellow:hover { background: rgba(255,208,36,0.2); }
.btn-red {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.15);
}
.btn-red:hover { background: rgba(239,68,68,0.2); }

.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 6px; }

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal {
  background: #161616;
  border: 1px solid var(--border-h);
  border-radius: 12px;
  width: 620px;
  max-width: calc(100vw - 40px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.modal-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 16px; padding: 4px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.terminal-output {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12.5px;
  color: #a3e635;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 100px;
}

/* ─── Form card ───────────────────────────────────────────────────────────── */
.form-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 680px;
}
.form-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
}
.form-group input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input::placeholder { color: var(--muted); }
.form-group input:focus { border-color: rgba(255,208,36,0.35); background: rgba(255,208,36,0.03); }

.input-icon-wrap { position: relative; }
.input-icon-wrap input { width: 100%; padding-right: 40px; }
.input-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px;
}
.input-eye:hover { color: var(--text); }

.form-actions { display: flex; gap: 10px; margin-top: 24px; align-items: center; }
.form-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.15);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .page { margin-left: 0; padding: 16px; }
  .monitor-strip { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ─── Stat Grid (Monitor page) ────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-sub { font-size: 12px; color: var(--muted); }

/* ─── Chart Section ───────────────────────────────────────────────────────── */
.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ─── Sparkline / Bar Charts ──────────────────────────────────────────────── */
.sparkline-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 60px;
  overflow: hidden;
}
.spark-bar {
  flex: 1;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  opacity: 0.85;
  transition: height 0.3s ease;
}
.spark-bar.blue { background: var(--blue); }

/* ─── Action Tiles (Node page) ────────────────────────────────────────────── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.action-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}
.action-tile:hover  { border-color: rgba(255,208,36,0.4); background: rgba(255,208,36,0.04); transform: translateY(-1px); }
.action-tile:active { transform: translateY(0); }
.action-tile i      { font-size: 18px; color: var(--accent); }
.action-tile span   { font-size: 13px; font-weight: 600; color: var(--text); }
.action-tile .t-name { font-size: 13px; font-weight: 600; color: var(--text); }
.action-tile .t-desc { font-size: 11px; color: var(--muted); }
.action-tile-red i  { color: var(--danger); }
.action-tile-red span { color: var(--danger); }
.action-tile-red:hover { border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.04); }

/* ─── Terminal (Node page) ────────────────────────────────────────────────── */
.terminal-wrap {
  background: #0a0a0c;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.terminal-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.t-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.t-dot.red    { background: #ef4444; }
.t-dot.yellow { background: #f59e0b; }
.t-dot.green  { background: #22c55e; }
.terminal-title { font-size: 12px; color: var(--muted); margin-left: 4px; }
.terminal-clear { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.terminal-clear:hover { color: var(--text); }
.terminal-output {
  padding: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: #c9d1d9;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 80px;
  max-height: 260px;
  overflow-y: auto;
}
.terminal-output.big { max-height: 420px; }

/* ─── Nodes List (Dashboard) ──────────────────────────────────────────────── */
.nodes-list { display: flex; flex-direction: column; gap: 12px; }
.node-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.node-row:hover { border-color: rgba(255,208,36,0.25); }
.node-head {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
  cursor: pointer;
}
.node-head-left  { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.node-head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.node-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,208,36,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px; flex-shrink: 0;
}
.node-name  { font-size: 14px; font-weight: 600; color: var(--text); }
.node-meta  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.node-status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
.node-status-badge.online {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}
.node-status-badge.offline {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.15);
}
.node-status-badge .status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}
.mcservers-wrap  { border-top: 1px solid var(--border); padding: 12px 18px; }
.mcservers-title { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.mc-empty { font-size: 12px; color: var(--muted); padding: 6px 0 2px; }

/* ─── MC Card Grid ────────────────────────────────────────────────────────── */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.mc-card {
  background: var(--surface-2, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.2s, transform 0.15s;
}
.mc-card:hover { border-color: rgba(255,208,36,0.3); transform: translateY(-1px); }
.mc-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mc-icon {
  width: 34px; height: 34px; border-radius: 7px;
  background: rgba(255,208,36,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 14px; flex-shrink: 0;
}
.mc-info { flex: 1; min-width: 0; }
.mc-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.mc-status {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px;
}
.mc-status.online { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.mc-status.idle   { background: rgba(107,114,128,0.15); color: #6b7280; border: 1px solid rgba(107,114,128,0.2); }
.mc-status .status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }
.mc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ─── Alert / Error ───────────────────────────────────────────────────────── */
.alert-error {
  padding: 10px 14px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.18);
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}

/* ─── Extras ──────────────────────────────────────────────────────────────── */
.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.btn-xs:hover { border-color: rgba(255,208,36,0.35); color: var(--text); }
.btn-xs.danger:hover { border-color: rgba(239,68,68,0.35); color: var(--danger); }
.form-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}
.form-select:focus { outline: none; border-color: rgba(255,208,36,0.35); }
.sidebar-logo-badge {
  font-size: 10px;
  background: rgba(255,208,36,0.12);
  color: var(--accent);
  border: 1px solid rgba(255,208,36,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
  margin-left: 4px;
}

/* ─── Monitor big (node page stats strip) ────────────────────────────────── */
.monitor-big {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.monitor-item-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}

/* ─── Node Monitor Card (monitor page) ───────────────────────────────────── */
.node-monitor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.node-monitor-card:hover { border-color: rgba(255,208,36,0.2); }
.node-monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.node-monitor-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.node-metric-item {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
}
.node-metric-item:last-child { border-right: none; }
.node-metric-val { font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (max-width: 900px) {
  .node-monitor-metrics { grid-template-columns: repeat(2, 1fr); }
  .node-metric-item:nth-child(2) { border-right: none; }
  .node-metric-item:nth-child(3) { border-top: 1px solid var(--border); }
  .node-metric-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
}

/* ─── MC Server Page ────────────────────────────────────────────────────── */
.monitor-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
@media (max-width: 900px) { .monitor-strip { grid-template-columns: repeat(2,1fr); } }
.monitor-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.monitor-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.monitor-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.monitor-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s ease;
}
.monitor-bar.bar-blue  { background: var(--blue); }
.monitor-bar.bar-green { background: var(--green); }
.monitor-val {
  font-size: 12px;
  color: var(--muted);
}
.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sparkline-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 56px;
}
.spark-bar {
  flex: 1;
  min-width: 4px;
  background: rgba(255,208,36,0.55);
  border-radius: 2px 2px 0 0;
  transition: height 0.4s;
}
.spark-bar.blue { background: rgba(99,179,237,0.6); }
.terminal-output.big { min-height: 360px; max-height: 480px; overflow-y: auto; }
.node-status-badge.online .status-dot { background: var(--green); }
.node-status-badge.idle   .status-dot { background: var(--muted); }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 2px; display: block; }

/* ─── File Manager Drop Zone ─────────────────────────────────────────────── */
.fm-drop-zone {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255,208,36,0.08);
  border: 2px dashed var(--accent);
  border-radius: 10px;
  z-index: 10;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  pointer-events: none;
}
.fm-drop-zone.active { display: flex; }
#tab-files { position: relative; }
.fm-name:hover span { color: var(--accent); }

/* ─── Sidebar user block ─────────────────────────────────────────────────── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,208,36,0.15);
  border: 1px solid rgba(255,208,36,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 10px; color: var(--muted); margin-top: 1px; }
.sidebar-logout {
  color: var(--muted);
  font-size: 13px;
  padding: 4px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
