/* ============================================================
   VENZITE PANEL — Admin Panel Styles
   ============================================================ */

/* ---------- View switching ---------- */
.view {
  display: none;
  animation: fadeIn 0.35s ease;
}
/* Extra admin pane for servers */
.admin-pane[data-pane="servers-admin"] .table-card { margin-top: 0; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Highlight the admin nav link */
.nav-link.admin-link {
  color: var(--cyan-primary);
  border: 1px solid rgba(0, 224, 255, 0.3);
}

.nav-link.admin-link.active {
  background: rgba(0, 224, 255, 0.2);
  box-shadow: 0 0 14px rgba(0, 224, 255, 0.3);
}

/* ---------- Page header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header h1 i {
  color: var(--cyan-primary);
  text-shadow: 0 0 14px rgba(0, 224, 255, 0.5);
}

/* ---------- Data table ---------- */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead {
  background: var(--bg-card-alt);
}

.data-table th {
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-dim);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-dim);
  color: #c0d4e8;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover {
  background: rgba(0, 224, 255, 0.03);
}

.data-table td i {
  color: var(--cyan-primary);
  margin-right: 6px;
}

.row-actions {
  display: flex;
  gap: 12px;
}

.row-actions i {
  cursor: pointer;
  font-size: 13px;
  transition: color var(--transition);
}

.row-actions i:hover { color: var(--cyan-soft); }

/* ---------- Analytics ---------- */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color var(--transition);
}

.analytics-card:hover { border-color: var(--cyan-line); }

.analytics-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.analytics-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.analytics-change {
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-change.up   { color: var(--status-online); }
.analytics-change.down { color: var(--status-offline); }

.chart-placeholder {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-dim);
}

.chart-placeholder i {
  font-size: 48px;
  color: var(--cyan-primary);
  opacity: 0.4;
  margin-bottom: 12px;
  display: block;
}

.chart-placeholder p {
  font-size: 15px;
  color: #b0c8e0;
  margin-bottom: 4px;
}

.chart-placeholder small {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   ADMIN HERO
   ============================================================ */
.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg,
    rgba(0, 224, 255, 0.08),
    rgba(0, 224, 255, 0.01) 60%),
    var(--bg-card);
  border: 1px solid rgba(0, 224, 255, 0.25);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.admin-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 224, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.admin-hero h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.admin-hero h1 i {
  color: var(--cyan-primary);
  text-shadow: 0 0 16px rgba(0, 224, 255, 0.6);
}

.admin-hero p {
  color: var(--text-dim);
  font-size: 13.5px;
}

/* ---------- Admin stat cards ---------- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.admin-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}

.admin-stat:hover {
  border-color: var(--cyan-line);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -12px rgba(0, 224, 255, 0.25);
}

.admin-stat > i {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(0, 224, 255, 0.1);
  color: var(--cyan-primary);
  border: 1px solid rgba(0, 224, 255, 0.25);
}

.admin-stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.admin-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Admin tabs ---------- */
.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  overflow-x: auto;
}

.admin-tab {
  background: transparent;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition);
}

.admin-tab:hover {
  color: var(--cyan-primary);
  background: rgba(0, 224, 255, 0.08);
}

.admin-tab.active {
  background: rgba(0, 224, 255, 0.18);
  color: var(--cyan-primary);
  box-shadow: inset 0 0 0 1px rgba(0, 224, 255, 0.3);
}

/* ---------- Admin panes ---------- */
.admin-pane { display: none; }
.admin-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pane-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ---------- Role tags ---------- */
.role-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.role-super    { background: rgba(0, 224, 255, 0.15); color: var(--cyan-primary); border: 1px solid rgba(0, 224, 255, 0.35); }
.role-admin    { background: rgba(155, 89, 255, 0.15); color: #b48cff; border: 1px solid rgba(155, 89, 255, 0.35); }
.role-moderator{ background: rgba(255, 179, 71, 0.15); color: #ffb347; border: 1px solid rgba(255, 179, 71, 0.35); }
.role-user     { background: rgba(139, 155, 181, 0.15); color: #8b9bb5; border: 1px solid rgba(139, 155, 181, 0.3); }

/* ---------- Nodes grid ---------- */
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.node-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition);
}

.node-card:hover {
  border-color: var(--cyan-line);
  transform: translateY(-2px);
}

.node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.node-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-name i { color: var(--cyan-primary); }

.node-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.node-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.node-bar-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #b0c8e0;
}

/* ---------- Settings ---------- */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}

.setting-row:hover { background: rgba(0, 224, 255, 0.03); }

.setting-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.setting-desc {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch .slider {
  position: absolute;
  inset: 0;
  background: #1c2a3e;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: 0.25s;
  border: 1px solid var(--border-dim);
}

.switch .slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #8b9bb5;
  border-radius: 50%;
  transition: 0.25s;
}

.switch input:checked + .slider {
  background: rgba(0, 224, 255, 0.3);
  border-color: var(--cyan-primary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
}

/* ---------- Form rows ---------- */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
}

.form-row label {
  font-size: 12.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 3px rgba(0, 224, 255, 0.1);
}

.form-row textarea { resize: vertical; }

/* ---------- Log viewer ---------- */
.log-viewer {
  background: var(--bg-console);
  border: 1px solid #1d2c3f;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
  max-height: 520px;
  overflow-y: auto;
}

.log-line {
  padding: 8px 0;
  border-bottom: 1px solid #131c2a;
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: #b0c8e0;
}

.log-line:last-child { border-bottom: none; }

.log-time {
  color: var(--cyan-primary);
  opacity: 0.75;
  min-width: 78px;
}

.log-level {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.4px;
  min-width: 56px;
  text-align: center;
}

.log-level.info  { background: rgba(0, 224, 255, 0.12); color: var(--cyan-primary); }
.log-level.warn  { background: rgba(255, 179, 71, 0.12); color: #ffb347; }
.log-level.error { background: rgba(255, 77, 109, 0.12); color: #ff4d6d; }