/* ===== NGAMPUSH AFFILIATE - MODERN BLUE DARK THEME ===== */
/* Full Screen • Responsive • White Text • Zero Edge Gap */

:root {
  /* Modern Blue Dark Palette */
  --nga-bg-page: #0a1628;
  --nga-bg-panel: linear-gradient(135deg, #0f2744 0%, #1a3c6e 50%, #0f2744 100%);
  --nga-bg-card: rgba(26, 60, 110, 0.6);
  --nga-bg-input: rgba(255, 255, 255, 0.08);
  --nga-bg-hover: rgba(255, 255, 255, 0.12);
  
  /* Borders & Shadows */
  --nga-border: rgba(255, 255, 255, 0.15);
  --nga-border-focus: rgba(0, 198, 162, 0.5);
  --nga-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --nga-shadow-hover: 0 12px 48px rgba(0, 198, 162, 0.25);
  
  /* Typography */
  --nga-text: #ffffff;
  --nga-text-muted: rgba(255, 255, 255, 0.65);
  --nga-text-accent: #00c6a2;
  --nga-text-gold: #f7b731;
  --nga-text-danger: #ff6b6b;
  
  /* UI Elements */
  --nga-primary: #00c6a2;
  --nga-primary-hover: #00a882;
  --nga-gold: #f7b731;
  --nga-gold-hover: #f59a00;
  --nga-danger: #e74c3c;
  
  /* Layout */
  --nga-radius: 16px;
  --nga-radius-sm: 10px;
  --nga-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--nga-bg-page);
  color: var(--nga-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== FULL SCREEN WRAPPER - ZERO EDGE GAP ===== */
.nga-wrapper {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: var(--nga-bg-panel);
  position: relative;
}

.nga-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(0, 198, 162, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(247, 183, 49, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* ===== CARD - CENTERED, MODERN GLASS ===== */
.nga-card {
  background: var(--nga-bg-card);
  border: 1px solid var(--nga-border);
  border-radius: var(--nga-radius);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--nga-shadow);
  position: relative;
  z-index: 1;
  margin: 20px;
}

/* ===== HEADER ===== */
.nga-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--nga-border);
}

.nga-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--nga-text);
  letter-spacing: -0.02em;
}

.nga-header p {
  margin: 0;
  color: var(--nga-text-muted);
  font-size: 0.95rem;
}

/* ===== TABS ===== */
.nga-tabs {
  display: flex;
  background: var(--nga-bg-input);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--nga-border);
}

.nga-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--nga-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 10px;
  transition: var(--nga-transition);
}

.nga-tab:hover { color: var(--nga-text); }

.nga-tab.active {
  background: var(--nga-bg-card);
  color: var(--nga-text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* ===== FORMS ===== */
.nga-form { display: none; animation: ngaFadeIn 0.3s ease; }
.nga-form.active { display: block; }

@keyframes ngaFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.nga-field { margin-bottom: 18px; }

.nga-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--nga-text-muted);
  letter-spacing: 0.02em;
}

.nga-field input,
.nga-field select {
  width: 100%;
  padding: 14px 16px;
  background: var(--nga-bg-input);
  border: 1px solid var(--nga-border);
  border-radius: var(--nga-radius-sm);
  color: var(--nga-text);
  font-size: 0.95rem;
  transition: var(--nga-transition);
}

.nga-field input::placeholder { color: rgba(255, 255, 255, 0.35); }

.nga-field input:focus,
.nga-field select:focus {
  outline: none;
  border-color: var(--nga-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 198, 162, 0.15);
  background: rgba(255, 255, 255, 0.12);
}

/* ===== BUTTONS ===== */
.nga-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--nga-radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--nga-transition);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nga-btn-primary {
  background: linear-gradient(135deg, var(--nga-primary), var(--nga-primary-hover));
  color: #fff;
}

.nga-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--nga-shadow-hover);
}

.nga-btn-gold {
  background: linear-gradient(135deg, var(--nga-gold), var(--nga-gold-hover));
  color: #0a1628;
}

.nga-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(247, 183, 49, 0.35);
}

.nga-btn-logout {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: var(--nga-text-danger);
  display: block;
  text-align: center;
  margin-top: 24px;
  text-decoration: none;
  padding: 12px;
  border-radius: var(--nga-radius-sm);
  font-weight: 600;
  transition: var(--nga-transition);
}

.nga-btn-logout:hover {
  background: var(--nga-danger);
  color: #fff;
  transform: translateY(-1px);
}

.nga-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.nga-btn-sm {
  background: var(--nga-primary);
  color: #0a1628;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--nga-transition);
  white-space: nowrap;
}

.nga-btn-sm:hover {
  background: var(--nga-gold);
  transform: translateY(-1px);
}

/* ===== ALERTS ===== */
.nga-alert {
  padding: 12px 16px;
  border-radius: var(--nga-radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
  border-left: 3px solid;
  background: rgba(255, 255, 255, 0.04);
}

.nga-alert.success {
  border-color: #10b981;
  color: #a7f3d0;
}

.nga-alert.error {
  border-color: var(--nga-danger);
  color: #fecaca;
}

/* ===== BADGES ===== */
.nga-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.nga-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.nga-badge.success {
  background: rgba(0, 198, 162, 0.15);
  color: var(--nga-text-accent);
}

/* ===== STATS GRID ===== */
.nga-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.nga-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nga-border);
  border-radius: var(--nga-radius-sm);
  padding: 18px;
  text-align: center;
  transition: var(--nga-transition);
}

.nga-stat:hover {
  background: var(--nga-bg-hover);
  transform: translateY(-2px);
}

.nga-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--nga-text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nga-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nga-text);
  margin-bottom: 4px;
}

.nga-sub {
  font-size: 0.7rem;
  color: var(--nga-text-muted);
}

/* ===== REFERRAL BOX ===== */
.nga-ref-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nga-border);
  border-radius: var(--nga-radius-sm);
  padding: 18px;
  margin-bottom: 24px;
}

.nga-ref-box > span {
  display: block;
  font-size: 0.8rem;
  color: var(--nga-text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.nga-ref-url {
  background: rgba(0, 198, 162, 0.1);
  border: 1px dashed var(--nga-text-accent);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--nga-text);
  word-break: break-all;
  margin-bottom: 10px;
}

/* ===== DASHBOARD TABS & CONTENT ===== */
.nga-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nga-border);
}

.nga-header-flex h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nga-text);
}

.nga-header-flex .nga-sub {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--nga-text-muted);
}

.nga-d-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--nga-border);
  padding-bottom: 2px;
}

.nga-d-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--nga-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--nga-transition);
  border-radius: 8px 8px 0 0;
}

.nga-d-tab:hover { color: var(--nga-text); }

.nga-d-tab.active {
  color: var(--nga-text-accent);
  border-bottom-color: var(--nga-text-accent);
  background: rgba(0, 198, 162, 0.08);
}

.nga-d-cont { display: none; padding-top: 16px; }
.nga-d-cont.active { display: block; animation: ngaFadeIn 0.3s ease; }

/* ===== TABLES ===== */
.nga-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--nga-text);
  margin-top: 8px;
}

.nga-table th,
.nga-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--nga-border);
}

.nga-table th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--nga-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nga-table tr:last-child td { border-bottom: none; }
.nga-table tr:hover { background: var(--nga-bg-hover); }

/* Status colors for table */
.status-warning { color: #fbbf24; font-weight: 600; }
.status-success { color: #34d399; font-weight: 600; }
.status-error { color: var(--nga-text-danger); font-weight: 600; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--nga-text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* ===== RESPONSIVE - TABLET & BELOW ===== */
@media (max-width: 768px) {
  .nga-card {
    padding: 24px 20px;
    margin: 12px;
    border-radius: var(--nga-radius);
  }
  
  .nga-header h2 { font-size: 1.35rem; }
  .nga-header p { font-size: 0.9rem; }
  
  .nga-stats { grid-template-columns: 1fr; gap: 12px; }
  
  .nga-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .nga-d-tabs {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  
  .nga-d-tab { flex-shrink: 0; padding: 10px 14px; }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 480px) {
  .nga-wrapper { padding: 0; }
  
  .nga-card {
    padding: 20px 16px;
    margin: 8px;
    border-radius: 14px;
  }
  
  .nga-header { margin-bottom: 20px; padding-bottom: 16px; }
  .nga-header h2 { font-size: 1.25rem; }
  
  .nga-field input,
  .nga-field select {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  
  .nga-btn { padding: 13px; font-size: 0.9rem; }
  
  .nga-ref-url { font-size: 0.8rem; padding: 10px; }
  
  .nga-table { font-size: 0.8rem; }
  .nga-table th,
  .nga-table td { padding: 10px 6px; }
  
  /* Hide less important columns on very small screens */
  .nga-table th:nth-child(3),
  .nga-table td:nth-child(3) { display: none; }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .nga-wrapper { align-items: flex-start; padding-top: 20px; }
  .nga-card { margin: 12px; max-height: calc(100vh - 40px); overflow-y: auto; }
}

/* ===== HIGH CONTRAST / ACCESSIBILITY ===== */
@media (prefers-contrast: high) {
  :root {
    --nga-border: rgba(255, 255, 255, 0.4);
    --nga-text-muted: rgba(255, 255, 255, 0.85);
  }
  .nga-field input:focus {
    box-shadow: 0 0 0 3px var(--nga-primary);
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .nga-wrapper { background: #fff; }
  .nga-card { box-shadow: none; border: 1px solid #000; }
  .nga-btn, .nga-tabs, .nga-d-tabs { display: none; }
}