/* ===================================================
   HELIACTYL — PILL NAV & ADMIN THEME
   =================================================== */

/* ── PILL NAV (shared user + admin) ── */
.pill-nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 14px 20px;
  pointer-events: none;
}

.pill-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(17, 19, 25, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  pointer-events: all;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 95vw;
  scrollbar-width: none;
}

.pill-nav::-webkit-scrollbar {
  display: none;
}

.pill-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  margin-right: 4px;
}

.pill-nav-brand i {
  font-size: 18px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pill-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.pill-nav-item i {
  font-size: 16px;
  transition: transform 0.25s ease;
}

.pill-nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.pill-nav-item:hover i {
  transform: scale(1.15);
}

.pill-nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(236, 72, 153, 0.25));
  box-shadow:
    0 0 20px rgba(139, 92, 246, 0.2),
    0 0 0 1px rgba(139, 92, 246, 0.25) inset;
}

.pill-nav-item.active i {
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.6));
}

.pill-nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
  flex-shrink: 0;
}

.pill-nav-item.logout {
  color: rgba(248, 113, 113, 0.7);
}

.pill-nav-item.logout:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.pill-nav-item.admin-link {
  color: rgba(250, 204, 21, 0.7);
}

.pill-nav-item.admin-link:hover {
  color: #facc15;
  background: rgba(250, 204, 21, 0.1);
}

.pill-nav-item.back-link {
  color: rgba(96, 165, 250, 0.7);
}

.pill-nav-item.back-link:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

/* ── LAYOUT ADJUSTMENTS FOR PILL NAV ── */
.pill-nav-page {
  padding-top: 80px;
  min-height: 100vh;
  background-color: #111319;
}

.pill-nav-page .content-wrapper {
  background-color: #111319 !important;
  padding: 20px 30px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── STATS CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  position: relative;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 16px 16px 0 0;
  opacity: 0.8;
}

.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.pink::before { background: linear-gradient(90deg, #ec4899, #f472b6); }

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.stat-card.purple .stat-card-icon { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.stat-card.blue .stat-card-icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.stat-card.green .stat-card-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-card.pink .stat-card-icon { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

.stat-card-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

/* ── CHARTS ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .charts-grid { grid-template-columns: 1fr; }
}

.chart-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
}

.chart-container {
  position: relative;
  height: 260px;
}

/* ── QUICK ACTIONS ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  color: #fff;
  transform: translateY(-2px);
}

.quick-action-btn i {
  font-size: 18px;
  color: var(--nebula-purple, #8b5cf6);
}

/* ── MODERN FORM CARDS ── */
.modern-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.modern-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.modern-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
}

.modern-card .card-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.modern-card .form-group {
  margin-bottom: 16px;
}

.modern-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.modern-card .form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 14px;
  transition: all 0.25s ease;
  outline: none;
}

.modern-card .form-control:focus {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.modern-card select.form-control {
  appearance: none;
  cursor: pointer;
}

.modern-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.modern-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.modern-btn.danger:hover {
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

/* ── GSAP ANIMATION HELPERS ── */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
}

/* ── VERSION CARD ── */
.version-card {
  padding: 18px 24px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  margin-bottom: 24px;
}

.version-card code {
  color: #60a5fa;
  font-weight: 700;
}

/* ── ALERT STYLES ── */
.admin-alert {
  padding: 14px 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.4s ease;
}

.admin-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.admin-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .pill-nav-wrapper {
    padding: 10px 12px;
  }
  .pill-nav {
    padding: 4px 6px;
  }
  .pill-nav-brand {
    padding: 6px 12px 6px 8px;
    font-size: 13px;
  }
  .pill-nav-item {
    padding: 6px 10px;
    font-size: 12px;
  }
  .pill-nav-item span {
    display: none;
  }
  .pill-nav-item i {
    font-size: 18px;
  }
  .pill-nav-page {
    padding-top: 65px;
  }
  .pill-nav-page .content-wrapper {
    padding: 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-card-value {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ── PAGE HEADER ── */
.page-header {
  margin-bottom: 28px;
}

.page-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
}

.page-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* ── FORMS GRID ── */
.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

@media (max-width: 480px) {
  .forms-grid {
    grid-template-columns: 1fr;
  }
}

/* ── HR DIVIDER ── */
.modern-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 20px 0;
}

/* ── NEW STAT CARD COLORS ── */
.stat-card.cyan::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.stat-card.cyan .stat-card-icon { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.stat-card.orange::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.orange .stat-card-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* ── LIVE INDICATOR ── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 1px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: livePulse 2s ease-in-out infinite;
}

.live-dot.pulse {
  animation: liveBlink 0.3s ease;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes liveBlink {
  0% { transform: scale(1); box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
  50% { transform: scale(1.5); box-shadow: 0 0 16px rgba(16, 185, 129, 0.9); }
  100% { transform: scale(1); box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
}

/* ── NODES GRID ── */
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 480px) {
  .nodes-grid { grid-template-columns: 1fr; }
}

.node-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px;
  transition: all 0.3s ease;
}

.node-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.node-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.node-title i { font-size: 20px; }

.node-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.node-status.online {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.node-status.maintenance {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.node-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.node-fqdn, .node-servers {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.node-fqdn i, .node-servers i { font-size: 14px; }

.node-resources {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.resource-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  grid-column: 1 / -1;
}

.resource-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resource-values {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.resource-free {
  color: rgba(255, 255, 255, 0.3);
}

.resource-bar-bg {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  flex: 1;
}

.resource-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px currentColor;
}

.resource-pct {
  font-size: 12px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

.loading-placeholder {
  animation: pulseFade 1.5s ease-in-out infinite;
}

@keyframes pulseFade {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
