/* ═══════════════════════════════════════════
   NayAofVpn — Global Design System
   Dark Theme + Glassmorphism + Cyan/Purple
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-primary:    #06060f;
  --bg-secondary:  #0d0d1a;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-glow:   rgba(0,212,255,0.3);

  --cyan:          #00d4ff;
  --cyan-dim:      rgba(0,212,255,0.15);
  --purple:        #7c3aed;
  --purple-dim:    rgba(124,58,237,0.15);
  --pink:          #f72585;
  --green:         #10b981;
  --yellow:        #f59e0b;
  --red:           #ef4444;

  --gradient-main:  linear-gradient(135deg, #00d4ff, #7c3aed);
  --gradient-card:  linear-gradient(135deg, rgba(0,212,255,0.08), rgba(124,58,237,0.08));
  --gradient-hero:  radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,212,255,0.15), transparent);

  --text-primary:   #f0f0ff;
  --text-secondary: rgba(240,240,255,0.55);
  --text-muted:     rgba(240,240,255,0.3);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-cyan:   0 0 40px rgba(0,212,255,0.15);
  --shadow-purple: 0 0 40px rgba(124,58,237,0.15);
  --shadow-card:   0 8px 32px rgba(0,0,0,0.4);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Background Orbs ── */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: orb-float 8s ease-in-out infinite;
}
body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: orb-float 10s ease-in-out infinite reverse;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-family: 'Prompt', sans-serif; font-weight: 700; line-height: 1.2; }

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Links ── */
a { color: var(--cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(6,6,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Prompt', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}
.nav-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-main);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-cta {
  background: var(--gradient-main) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,212,255,0.4); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid rgba(0,212,255,0.4);
}
.btn-outline:hover { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.btn-green { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.3); color: #fff; }

.btn-red { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-yellow { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: rgba(0,212,255,0.2); box-shadow: var(--shadow-cyan); }

.card-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition);
}
.card-glow:hover::before { opacity: 1; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,212,255,0.2); }
.badge-purple { background: var(--purple-dim); color: #a78bfa; border: 1px solid rgba(124,58,237,0.2); }
.badge-green { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-red { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* ── Status Dot ── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.offline { background: var(--red); }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.form-control {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Prompt', sans-serif;
  transition: var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
  background: rgba(0,212,255,0.04);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: #1a1a2e; }

/* ── Section ── */
section { position: relative; z-index: 1; }
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.section-title { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 16px; }
.section-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; }

/* ── Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover { border-color: rgba(0,212,255,0.2); }
.stat-value { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 0.82rem; color: var(--text-secondary); }

/* ── Table ── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: rgba(255,255,255,0.04); }
th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody tr:last-child td { border-bottom: none; }

/* ── Toast ── */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  backdrop-filter: blur(20px);
  animation: toast-in 0.3s ease forwards;
  box-shadow: var(--shadow-card);
  min-width: 280px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.info { border-color: rgba(0,212,255,0.4); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Loading Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-main);
  transition: width 0.6s ease;
}

/* ── Sidebar Layout ── */
.sidebar-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Prompt', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: var(--gradient-main);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-menu { list-style: none; padding: 0 12px; }
.sidebar-menu li { margin-bottom: 4px; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar-menu a:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-menu a.active { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,212,255,0.15); }
.sidebar-menu .menu-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-section-label {
  padding: 12px 26px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.main-content {
  margin-left: 260px;
  padding: 32px;
  flex: 1;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* ── Page Header ── */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 1.8rem; margin-bottom: 6px; }
.page-header p { color: var(--text-secondary); font-size: 0.95rem; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 90%;
  max-width: 480px;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.25rem; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ── Animations ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,212,255,0.2); }
  50% { box-shadow: 0 0 40px rgba(0,212,255,0.5); }
}
.animate-fade-up { animation: fade-up 0.6s ease forwards; }
.animate-fade-in { animation: fade-in 0.5s ease forwards; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: var(--transition); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ── Utility ── */
.text-cyan { color: var(--cyan); }
.text-purple { color: #a78bfa; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.text-center { text-align: center; }

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
