/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  padding-top: 60px;
}

a { color: #e74c3c; }
a:hover { color: #c0392b; text-decoration: none; }

/* ===== Navbar ===== */
#main-nav {
  background: transparent;
  border: none;
  transition: background 0.3s, box-shadow 0.3s;
}
#main-nav.scrolled {
  background: rgba(20,20,20,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#main-nav .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}
#main-nav .navbar-brand:hover { color: #ff9000; }
#main-nav .nav > li > a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  letter-spacing: 0.05em;
}
#main-nav .nav > li > a:hover,
#main-nav .nav > li.active > a {
  color: #ff9000;
  background: transparent;
}
#main-nav .navbar-toggle .icon-bar { background: #fff; }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1600&q=80') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 0 20px;
}
.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.2em;
  text-transform: uppercase;
}
.hero-sub {
  font-size: 2.5rem;
  color: #ff9000;
  font-weight: 300;
  margin-bottom: 1rem;
}
.hero-desc {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  opacity: 0.9;
}
.btn-outline-white {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  padding: 10px 32px;
  font-size: 1rem;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-outline-white:hover {
  background: #fff;
  color: #333;
}

/* ===== Subscribe Bar ===== */
.subscribe-bar {
  background: #e74c3c;
  padding: 28px 0;
}
.subscribe-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.subscribe-desc h3 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 1.4rem;
}
.subscribe-desc p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 0.9rem;
}
.subscribe-form .form-control {
  border-radius: 2px;
  border: none;
  margin-right: 8px;
  height: 38px;
}
.subscribe-form .btn-danger {
  background: #c0392b;
  border: none;
  height: 38px;
  padding: 0 24px;
}

/* ===== Section Shared ===== */
.section-header {
  margin-bottom: 50px;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 8px;
}
.section-sub {
  color: #888;
  font-size: 1rem;
}
.section-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #333;
}

/* ===== Features ===== */
.features-section {
  padding: 80px 0;
  background: #fafafa;
}
.features-row { margin-top: 20px; }
.feature-item {
  padding: 30px 20px;
}
.feature-icon {
  color: #e74c3c;
  margin-bottom: 20px;
}
.feature-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.feature-item p {
  color: #666;
  line-height: 2;
  font-size: 0.9rem;
}

/* ===== Pricing ===== */
.pricing-section {
  padding: 80px 0;
  background: #fff;
}
.pricing-row { margin-top: 20px; }
.pricing-card {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 40px 30px;
  text-align: center;
  margin-bottom: 24px;
  transition: box-shadow 0.2s;
}
.pricing-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.pricing-featured {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
  transform: scale(1.03);
}
.pricing-featured .pricing-features li { color: rgba(255,255,255,0.9); }
.pricing-icon { margin-bottom: 16px; color: inherit; opacity: 0.8; }
.pricing-card h4 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #e74c3c;
}
.pricing-featured .pricing-price { color: #fff; }
.pricing-price span { font-size: 1rem; font-weight: 300; }
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: #555;
}
.pricing-featured .pricing-features li { border-color: rgba(255,255,255,0.2); }
.btn-outline-primary {
  border: 2px solid #e74c3c;
  color: #e74c3c;
  background: transparent;
  border-radius: 2px;
  padding: 10px 0;
  transition: all 0.2s;
}
.btn-outline-primary:hover { background: #e74c3c; color: #fff; }
.btn-white {
  background: #fff;
  color: #e74c3c;
  border: 2px solid #fff;
  border-radius: 2px;
  padding: 10px 0;
}
.btn-white:hover { background: rgba(255,255,255,0.85); color: #e74c3c; }

/* ===== Footer ===== */
.site-footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 40px 0 24px;
}
.site-footer p { margin-bottom: 8px; }
.site-footer .fa-rocket { color: #ff9000; }
.site-footer .fa-heart { color: #e74c3c; }
.footer-sub { font-size: 0.85rem; }
.footer-links a { color: #aaa; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.8rem; color: #666; margin-top: 12px; }

/* ===== Go Top ===== */
.go-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 999;
  text-decoration: none;
}
.go-top:hover { background: #c0392b; color: #fff; }
.go-top.visible { display: flex; }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
}
.auth-header {
  background: #3f51b5;
  padding: 14px 0;
}
.auth-header .brand {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
}
.auth-header .brand:hover { color: rgba(255,255,255,0.8); }
.auth-header .nav-links a {
  color: rgba(255,255,255,0.8);
  margin-left: 16px;
  font-size: 0.9rem;
}
.auth-header .nav-links a:hover { color: #fff; }
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.auth-card-header {
  background: #3f51b5;
  color: #fff;
  padding: 24px 28px 16px;
}
.auth-card-header h1 {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0;
}
.auth-card-body {
  padding: 28px;
}
.auth-avatar {
  text-align: center;
  margin-bottom: 20px;
}
.auth-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #e0e0e0;
}
.auth-card .form-group { margin-bottom: 20px; }
.auth-card .form-control {
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  box-shadow: none;
  padding-left: 0;
  font-size: 0.95rem;
}
.auth-card .form-control:focus {
  border-bottom-color: #3f51b5;
  box-shadow: none;
}
.auth-card label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 400;
}
.btn-brand {
  background: #3f51b5;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 10px 0;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.btn-brand:hover { background: #303f9f; color: #fff; }
.auth-footer-links {
  display: flex;
  justify-content: space-between;
  padding: 12px 28px 20px;
}
.auth-footer-links a {
  color: #3f51b5;
  font-size: 0.85rem;
}
.auth-footer-links a:hover { color: #303f9f; }

/* ===== User Dashboard ===== */
.user-page { background: #f5f5f5; min-height: 100vh; }
.user-header {
  background: #ff9800;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.user-header .menu-btn {
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
}
.user-header .user-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}
.user-header .dropdown-menu { right: 0; left: auto; }

.user-sidebar {
  position: fixed;
  top: 0; left: -260px;
  width: 260px;
  height: 100%;
  background: #fff;
  z-index: 1100;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  transition: left 0.3s;
  overflow-y: auto;
}
.user-sidebar.open { left: 0; }
.sidebar-logo {
  background: #ff9800;
  color: #fff;
  padding: 20px 20px 16px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1050;
}
.sidebar-overlay.active { display: block; }
.sidebar-nav { list-style: none; padding: 8px 0; margin: 0; }
.sidebar-nav .nav-group-title {
  padding: 12px 20px 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.08em;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #444;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}
.sidebar-nav li a:hover { background: #fff3e0; color: #ff9800; }
.sidebar-nav li a .icon { font-size: 18px; color: #888; }
.sidebar-nav li a:hover .icon { color: #ff9800; }
.sidebar-divider { border-top: 1px solid #f0f0f0; margin: 8px 0; }

.user-content {
  padding-top: 56px;
}
.content-header-bar {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  background-image: url('https://images.unsplash.com/photo-1557682250-33bd709cbe85?w=1200&q=60');
  background-size: cover;
  background-position: center;
  padding: 32px 0 28px;
  position: relative;
}
.content-header-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(230,120,0,0.75);
}
.content-header-bar .container { position: relative; z-index: 1; }
.content-header-bar h1 {
  color: #fff;
  font-weight: 300;
  font-size: 1.8rem;
  margin: 0;
}
.user-main { padding: 24px 0 40px; }

/* Cards */
.card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 12px;
}
.card-body { padding: 20px; }
.card-footer-bar {
  border-top: 1px solid #f0f0f0;
  padding: 10px 16px;
}
.card-footer-bar .btn-flat {
  background: none;
  border: none;
  color: #ff9800;
  font-size: 0.85rem;
  padding: 4px 8px;
  cursor: pointer;
}
.card-footer-bar .btn-flat:hover { color: #e65100; }

/* Traffic donut */
.traffic-donut-wrap { text-align: center; padding: 20px 0 10px; }
.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
}
.donut-svg { transform: rotate(-90deg); }
.donut-bg { fill: none; stroke: #e0e0e0; stroke-width: 18; }
.donut-fill { fill: none; stroke: #ff9000; stroke-width: 18; stroke-linecap: round; transition: stroke-dasharray 0.6s; }
.donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}
.traffic-table { width: 100%; font-size: 0.85rem; }
.traffic-table th { color: #888; font-weight: 500; padding: 6px 0; }
.traffic-table td { padding: 4px 0; }

/* Account info */
.account-dl { font-size: 0.9rem; }
.account-dl dt { color: #888; font-weight: 400; float: left; width: 90px; clear: left; padding: 6px 0; }
.account-dl dd { margin-left: 100px; padding: 6px 0; border-bottom: 1px solid #f5f5f5; }
.account-dl dd:last-child { border-bottom: none; }

/* Announcements */
.ann-list { list-style: none; padding: 0; margin: 0; }
.ann-list li { padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.9rem; }
.ann-list li:last-child { border-bottom: none; }
.ann-list a { color: #333; }
.ann-list a:hover { color: #ff9800; }

/* Checkin btn */
.btn-checkin {
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 8px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-checkin:hover { background: #e65100; }
.btn-checkin.disabled { background: #ccc; cursor: default; }

/* Node list */
.node-group { margin-bottom: 8px; }
.node-group-header {
  background: #fff;
  border-radius: 4px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: background 0.15s;
}
.node-group-header:hover { background: #fff8f0; }
.node-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.node-status.online { background: #4caf50; }
.node-status.offline { background: #f44336; }
.node-status.unknown { background: #ff9800; }
.node-group-name { flex: 1; font-size: 0.95rem; font-weight: 500; }
.node-group-meta { font-size: 0.8rem; color: #888; }
.node-group-body { display: none; padding: 8px 0 0 0; }
.node-group-body.open { display: block; }
.node-item {
  background: #fff;
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-size: 0.9rem;
}
.node-item h5 { margin: 0 0 6px; font-size: 0.95rem; color: #333; }
.node-item p { margin: 0; color: #888; font-size: 0.85rem; }

/* Shop */
.shop-table { font-size: 0.9rem; }
.shop-table th { background: #f5f5f5; font-weight: 500; }
.shop-table td, .shop-table th { padding: 12px 14px; vertical-align: middle; }
.btn-buy {
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-buy:hover { background: #e65100; }

/* Ticket */
.ticket-item {
  background: #fff;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.ticket-item h5 { margin: 0 0 6px; font-size: 0.95rem; }
.ticket-meta { font-size: 0.8rem; color: #888; }
.badge-open { background: #4caf50; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; }
.badge-closed { background: #9e9e9e; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; }

/* Admin */
.admin-page { background: #eceff1; min-height: 100vh; }
.admin-header {
  background: #37474f;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.admin-header .brand { color: #fff; font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.admin-header .brand:hover { color: #cfd8dc; }
.admin-header .admin-user { color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.admin-sidebar {
  position: fixed;
  top: 56px; left: 0;
  width: 220px;
  height: calc(100% - 56px);
  background: #263238;
  overflow-y: auto;
  z-index: 900;
}
.admin-nav { list-style: none; padding: 12px 0; margin: 0; }
.admin-nav .nav-section {
  padding: 12px 16px 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #607d8b;
  letter-spacing: 0.1em;
}
.admin-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: #b0bec5;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.admin-nav li a:hover,
.admin-nav li a.active { background: #37474f; color: #fff; }
.admin-nav li a .fa { width: 18px; text-align: center; }
.admin-content {
  margin-left: 220px;
  padding-top: 56px;
}
.admin-content-inner { padding: 24px; }
.stat-card {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.stat-icon.blue { background: #2196f3; }
.stat-icon.green { background: #4caf50; }
.stat-icon.orange { background: #ff9800; }
.stat-icon.red { background: #f44336; }
.stat-info h3 { margin: 0 0 4px; font-size: 1.6rem; font-weight: 700; }
.stat-info p { margin: 0; color: #888; font-size: 0.85rem; }
.admin-table { font-size: 0.88rem; }
.admin-table th { background: #f5f5f5; font-weight: 500; white-space: nowrap; }
.admin-table td { vertical-align: middle; white-space: nowrap; }
.btn-sm-action {
  padding: 3px 10px;
  font-size: 0.8rem;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  margin-right: 4px;
}
.btn-edit { background: #2196f3; color: #fff; }
.btn-delete { background: #f44336; color: #fff; }
.btn-edit:hover { background: #1976d2; }
.btn-delete:hover { background: #d32f2f; }

/* TOS */
.tos-page { padding: 80px 0 60px; }
.tos-page h1 { font-size: 2rem; margin-bottom: 24px; }
.tos-page h3 { font-size: 1.1rem; margin-top: 28px; color: #333; }
.tos-page p, .tos-page li { color: #555; line-height: 1.8; }

/* Responsive */
@media (max-width: 767px) {
  .hero-content h1 { font-size: 2rem; }
  .hero-sub { font-size: 1.5rem; }
  .subscribe-wrap { flex-direction: column; }
  .subscribe-form .form-control { margin-bottom: 8px; width: 100%; }
  .pricing-featured { transform: none; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
}
