* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #0a0a0f;
  color: #f3f4f6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* GLOW BACKGROUNDS */
.glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.15);
  top: -100px;
  left: 20%;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: rgba(99, 102, 241, 0.12);
  bottom: -150px;
  right: 15%;
}

.portal-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
}

/* TOP NAVIGATION */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(17, 18, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 40px;
}

.user-info-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.4);
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  border: 2px solid #0a0a0f;
}

.user-text {
  display: flex;
  flex-direction: column;
}

.username {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
}

.role-badge {
  font-size: 11px;
  color: #a78bfa;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn-outline {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.btn-danger-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 9px;
}

.btn-danger-icon:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
}

.brand-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  background: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* VIEWS & CARDS */
.hidden {
  display: none !important;
}

.view-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* LOGIN VIEW */
.login-card {
  background: rgba(17, 18, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  margin-top: 60px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.logo-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.logo-circle svg {
  width: 32px;
  height: 32px;
  color: #ffffff;
}

.login-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.login-card p {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 32px;
}

.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: #5865F2;
  color: #ffffff;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.35);
}

.btn-discord:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(88, 101, 242, 0.5);
}

/* HERO SECTION */
.hero-section {
  text-align: center;
  margin-bottom: 48px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 30%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: #9ca3af;
}

/* 3 SYSTEM CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  width: 100%;
}

.hub-card {
  position: relative;
  background: rgba(17, 18, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px 28px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.hub-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  filter: blur(35px);
  transition: all 0.3s ease;
}

.hub-card:hover .card-glow {
  background: rgba(139, 92, 246, 0.35);
  transform: scale(1.3);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #a78bfa;
  transition: all 0.3s ease;
}

.hub-card:hover .card-icon {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #8b5cf6;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.card-content p {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 24px;
  min-height: 68px;
}

.card-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #a78bfa;
  margin-top: auto;
  transition: all 0.2s ease;
}

.card-action svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.hub-card:hover .card-action {
  color: #ffffff;
}

.hub-card:hover .card-action svg {
  transform: translateX(4px);
}

/* MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #11121a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.modal-title svg {
  width: 22px;
  height: 22px;
  color: #a78bfa;
}

.modal-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 24px;
}

.whitelist-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 24px;
}

.whitelist-form input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 13px;
}

.whitelist-form input:focus {
  outline: none;
  border-color: #8b5cf6;
}

.btn-primary {
  background: #8b5cf6;
  color: #ffffff;
}

.btn-primary:hover {
  background: #7c3aed;
}

.whitelist-table-container {
  max-height: 280px;
  overflow-y: auto;
}

.whitelist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.whitelist-table th, .whitelist-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.whitelist-table th {
  color: #9ca3af;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

.btn-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.btn-delete:hover {
  background: #ef4444;
  color: #ffffff;
}
