/* ===================================
   CLOUDVPS - MAIN STYLESHEET
   Dark Tech + Neon Green Aesthetic
=================================== */

:root {
  --bg-primary: #080c10;
  --bg-secondary: #0d1117;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --border: #1e2d3d;
  --border-glow: #00ff8840;
  --accent: #00ff88;
  --accent-dim: #00cc6a;
  --accent-glow: 0 0 20px #00ff8840;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --danger: #ff4757;
  --warning: #ffa502;
  --info: #00b4d8;
  --success: #00ff88;
  --font-mono: 'Space Mono', monospace;
  --font-display: 'Syne', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ---- NAVBAR ---- */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(8,12,16,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text-primary);
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
}
.brand-icon { font-size: 1.4rem; color: var(--accent); }
.nav-brand strong { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  padding: 6px 12px; border-radius: var(--radius);
  font-size: 0.9rem; transition: all 0.2s;
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-card); }
.admin-link { color: var(--warning) !important; font-weight: 700; }

.btn-nav {
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}
.btn-nav-primary {
  background: var(--accent) !important;
  color: #000 !important; font-weight: 700 !important;
  border-color: var(--accent) !important;
}
.btn-nav-primary:hover { background: var(--accent-dim) !important; }
.btn-logout { color: var(--danger) !important; }
.btn-logout:hover { background: rgba(255,71,87,0.1) !important; }

.nav-user { display: flex; align-items: center; gap: 8px; }
.balance-badge {
  background: rgba(0,255,136,0.1);
  border: 1px solid var(--border-glow);
  color: var(--accent);
  padding: 4px 10px; border-radius: 20px;
  font-family: var(--font-mono); font-size: 0.8rem;
}

.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* ---- FLASH MESSAGES ---- */
.flash {
  padding: 14px 24px; display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; border-left: 4px solid;
}
.flash-success { background: rgba(0,255,136,0.08); border-color: var(--success); color: var(--success); }
.flash-error { background: rgba(255,71,87,0.08); border-color: var(--danger); color: var(--danger); }
.flash-info { background: rgba(0,180,216,0.08); border-color: var(--info); color: var(--info); }
.flash button { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.2rem; }

/* ---- HERO ---- */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,255,136,0.08), transparent);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,255,136,0.08); border: 1px solid var(--border-glow);
  color: var(--accent); padding: 6px 16px; border-radius: 20px;
  font-size: 0.85rem; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; transition: all 0.2s;
}
.btn-primary {
  background: var(--accent); color: #000;
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); box-shadow: var(--accent-glow); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff2f3f; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- STATS BAR ---- */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  background: var(--bg-secondary);
  padding: 32px 24px; text-align: center;
}
.stat-num {
  font-size: 2rem; font-weight: 800;
  color: var(--accent); font-family: var(--font-mono);
}
.stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* ---- PLANS ---- */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 12px; }
.section-header h2 span { color: var(--accent); }
.section-header p { color: var(--text-secondary); }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; position: relative;
  transition: all 0.3s;
}
.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,255,136,0.1);
}
.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card), rgba(0,255,136,0.04));
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #000;
  padding: 4px 16px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
}
.plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.plan-price {
  font-family: var(--font-mono);
  font-size: 1.8rem; font-weight: 700; color: var(--accent);
  margin: 16px 0 4px;
}
.plan-price span { font-size: 0.9rem; color: var(--text-secondary); font-weight: 400; }
.plan-specs { list-style: none; margin: 20px 0; }
.plan-specs li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.plan-specs li:last-child { border-bottom: none; }
.plan-specs .icon { color: var(--accent); width: 20px; text-align: center; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1.1rem; font-weight: 700; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-display); font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control option { background: var(--bg-secondary); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg-secondary);
  padding: 12px 16px; text-align: left;
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: rgba(0,255,136,0.1); color: var(--accent); border: 1px solid rgba(0,255,136,0.2); }
.badge-warning { background: rgba(255,165,2,0.1); color: var(--warning); border: 1px solid rgba(255,165,2,0.2); }
.badge-danger { background: rgba(255,71,87,0.1); color: var(--danger); border: 1px solid rgba(255,71,87,0.2); }
.badge-info { background: rgba(0,180,216,0.1); color: var(--info); border: 1px solid rgba(0,180,216,0.2); }
.badge-muted { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }

/* ---- DASHBOARD ---- */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}
.sidebar-menu { list-style: none; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; text-decoration: none;
  color: var(--text-secondary); font-size: 0.9rem;
  transition: all 0.2s;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  color: var(--text-primary);
  background: rgba(0,255,136,0.05);
  border-right: 3px solid var(--accent);
}
.sidebar-menu li a i { width: 18px; text-align: center; color: var(--accent); }
.sidebar-section { padding: 8px 24px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-top: 16px; }

.main-content { padding: 32px; }
.page-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.page-subtitle { color: var(--text-secondary); margin-bottom: 32px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.stat-card .label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.stat-card .value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-mono); margin: 8px 0 4px; }
.stat-card .change { font-size: 0.8rem; color: var(--text-muted); }
.stat-card.accent-card { border-color: var(--border-glow); }
.stat-card.accent-card .value { color: var(--accent); }

/* ---- AUTH PAGES ---- */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: radial-gradient(ellipse at center, rgba(0,255,136,0.03) 0%, transparent 70%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 440px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-text { font-size: 2rem; font-weight: 800; }
.auth-logo .logo-text span { color: var(--accent); }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.auth-sub { color: var(--text-secondary); margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--text-secondary); font-size: 0.9rem; }
.auth-switch a { color: var(--accent); text-decoration: none; }

/* ---- VPS CARD ---- */
.vps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.vps-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.vps-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.vps-ip { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.vps-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.vps-info-item .key { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.vps-info-item .val { font-size: 0.9rem; font-family: var(--font-mono); }
.vps-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ---- DEPOSIT ---- */
.deposit-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.deposit-method {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; text-align: center;
  cursor: pointer; transition: all 0.2s;
}
.deposit-method:hover, .deposit-method.selected {
  border-color: var(--accent);
  background: rgba(0,255,136,0.05);
}
.deposit-method .icon { font-size: 2.5rem; margin-bottom: 8px; }
.zalo-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0068ff; color: #fff;
  padding: 10px 20px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
  margin-top: 12px; transition: all 0.2s;
}
.zalo-btn:hover { background: #0055cc; }

/* ---- FOOTER ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-container {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 24px 40px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px;
}
.footer-brand { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.footer-brand strong { color: var(--accent); }
.footer p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer ul li a:hover { color: var(--accent); }
.footer-col p { margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.85rem;
}

/* ---- ADMIN ---- */
.admin-header {
  background: linear-gradient(135deg, #1a0a00, #0d0805);
  border-bottom: 2px solid var(--warning);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-title { font-size: 1.2rem; font-weight: 800; color: var(--warning); }
.admin-grid { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 130px); }
.admin-sidebar { background: #0a0e13; border-right: 1px solid var(--border); padding: 20px 0; }

/* ---- UTILITY ---- */
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-secondary); }
.text-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-secondary); }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-primary); border-bottom: 1px solid var(--border); padding: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
