/* ==========================================================================
   Software Reseller Key Panel - Modern Dark Glassmorphism Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Palette */
  --bg-base: #090b10;
  --bg-surface: #0f131c;
  --bg-surface-elevated: #151a27;
  --bg-glass: rgba(18, 24, 38, 0.75);
  --bg-glass-input: rgba(10, 14, 23, 0.65);
  --bg-glass-hover: rgba(30, 41, 62, 0.55);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(0, 240, 255, 0.5);

  /* Accents & Brand */
  --neon-cyan: #00f0ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.35);
  --neon-purple: #9d4edd;
  --neon-purple-glow: rgba(157, 78, 221, 0.35);
  --neon-pink: #f72585;
  --neon-blue: #3a86ff;
  --neon-emerald: #10b981;
  --neon-emerald-glow: rgba(16, 185, 129, 0.3);
  --neon-amber: #f59e0b;
  --neon-rose: #ef4444;
  --neon-rose-glow: rgba(239, 68, 68, 0.3);

  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090b10;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow-cyan: 0 0 25px var(--neon-cyan-glow);
  --shadow-glow-purple: 0 0 25px var(--neon-purple-glow);

  /* Transitions */
  --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lighting */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  animation: floatOrb 20s ease-in-out infinite alternate;
}

.ambient-orb-1 {
  width: 500px;
  height: 500px;
  background: var(--neon-cyan);
  top: -100px;
  right: -50px;
}

.ambient-orb-2 {
  width: 600px;
  height: 600px;
  background: var(--neon-purple);
  bottom: -150px;
  left: -100px;
  animation-duration: 25s;
  animation-delay: -5s;
}

.ambient-orb-3 {
  width: 400px;
  height: 400px;
  background: var(--neon-pink);
  top: 40%;
  left: 35%;
  opacity: 0.12;
  animation-duration: 30s;
  animation-delay: -10s;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, -30px) scale(1.08);
  }

  100% {
    transform: translate(-30px, 40px) scale(0.92);
  }
}

/* App Container */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 11, 16, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  font-size: 1.3rem;
  box-shadow: 0 0 20px var(--neon-cyan-glow);
  position: relative;
}

.brand-logo-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--neon-cyan), transparent, var(--neon-purple));
  z-index: -1;
  filter: blur(4px);
  opacity: 0.7;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
}

.brand-title span:first-child {
  background: linear-gradient(90deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Nav View Switcher (Tabs) */
.view-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.switcher-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--trans-fast);
}

.switcher-btn:hover {
  color: var(--text-primary);
}

.switcher-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(157, 78, 221, 0.15));
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.switcher-btn .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.switcher-btn.active .badge {
  background: var(--neon-cyan);
  color: #000;
}

/* User / Credits info */
.reseller-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.credit-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-emerald);
}

.credit-pill i {
  font-size: 1rem;
}

.user-avatar-badge {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a86ff, #9d4edd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.user-role {
  font-size: 0.65rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-wrapper {
  flex: 1;
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 2rem 3rem 2rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Metrics / Stats Grid
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  position: relative;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  overflow: hidden;
  transition: var(--trans-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--neon-cyan)), transparent);
  opacity: 0.7;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.metric-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-accent-soft, rgba(0, 240, 255, 0.1));
  color: var(--card-accent, var(--neon-cyan));
  font-size: 1.15rem;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.metric-value {
  font-size: 2.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-positive {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-emerald);
}

.badge-neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--neon-amber);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-rose);
}

/* ==========================================================================
   Panel Actions / Toolbar
   ========================================================================== */
.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-box input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: var(--trans-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

.search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: var(--trans-fast);
}

.filter-select:focus {
  border-color: var(--neon-cyan);
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--trans-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #00b4d8);
  color: #03131c;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
  filter: brightness(1.1);
}

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

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-rose);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--neon-rose);
  color: #fff;
  box-shadow: 0 4px 15px var(--neon-rose-glow);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.55rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Interactive License Keys Table
   ========================================================================== */
.table-container {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 19, 28, 0.5);
}

.table-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.table-counter-pill {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.batch-actions-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  animation: fadeIn 0.2s ease;
}

.batch-actions-bar.show {
  display: flex;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.keys-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.keys-table th {
  padding: 0.85rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 14, 23, 0.4);
  white-space: nowrap;
}

.keys-table td {
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.keys-table tbody tr {
  transition: var(--trans-fast);
}

.keys-table tbody tr:hover {
  background: var(--bg-glass-hover);
}

.keys-table tbody tr.row-banned {
  opacity: 0.65;
  background: rgba(239, 68, 68, 0.04);
}

/* Key Display in Cell */
.key-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.key-code {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 240, 255, 0.2);
  font-size: 0.85rem;
  user-select: all;
}

.copy-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  transition: var(--trans-fast);
}

.copy-mini-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-unused {
  background: rgba(58, 134, 255, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(58, 134, 255, 0.25);
}

.status-unused .status-dot {
  background: #60a5fa;
  box-shadow: 0 0 8px #60a5fa;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-active .status-dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.status-expired {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-expired .status-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.status-banned {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-banned .status-dot {
  background: #f87171;
  box-shadow: 0 0 8px #f87171;
}

/* HWID Badge & Reset Action */
.hwid-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hwid-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-xs);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hwid-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.75rem;
}

.hwid-reset-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  transition: var(--trans-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hwid-reset-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Action Buttons in Table */
.cell-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-xs);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--trans-fast);
}

.action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.15);
}

.action-btn.btn-edit:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.15);
}

.action-btn.btn-extend:hover {
  color: var(--neon-emerald);
  border-color: var(--neon-emerald);
  background: rgba(16, 185, 129, 0.15);
}

.action-btn.btn-ban:hover {
  color: var(--neon-amber);
  border-color: var(--neon-amber);
  background: rgba(245, 158, 11, 0.15);
}

.action-btn.btn-delete:hover {
  color: var(--neon-rose);
  border-color: var(--neon-rose);
  background: rgba(239, 68, 68, 0.15);
}

/* Empty State */
.table-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* ==========================================================================
   CLIENT SOFTWARE LOGIN / AUTHENTICATOR VIEW
   ========================================================================== */
.client-auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(15, 19, 28, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 240, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem auto;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #090b10;
  box-shadow: 0 0 30px var(--neon-cyan-glow);
  position: relative;
  animation: pulseLogo 3s infinite ease-in-out;
}

@keyframes pulseLogo {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 25px var(--neon-cyan-glow);
  }

  50% {
    transform: scale(1.04);
    box-shadow: 0 0 35px var(--neon-purple-glow);
  }
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-hwid-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auth-form-group {
  margin-bottom: 1.5rem;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.key-input-wrapper {
  position: relative;
}

.key-input {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.9rem 4.5rem 0.9rem 1.15rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  outline: none;
  transition: var(--trans-normal);
}

.key-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  background: rgba(15, 20, 32, 0.9);
}

.paste-key-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--trans-fast);
}

.paste-key-btn:hover {
  background: var(--neon-cyan);
  color: #000;
}

.auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

.remember-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.remember-checkbox input[type="checkbox"] {
  accent-color: var(--neon-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.auth-btn-submit {
  width: 100%;
  padding: 0.95rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #020d18;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
  transition: var(--trans-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.auth-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.5);
  filter: brightness(1.1);
}

.auth-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--neon-cyan);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Authenticated / Success Software Loader State */
.auth-success-card {
  display: none;
  text-align: center;
  animation: fadeIn 0.4s ease forwards;
}

.status-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid var(--neon-emerald);
  margin: 0 auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--neon-emerald);
  box-shadow: 0 0 30px var(--neon-emerald-glow);
  position: relative;
}

.software-info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}

.software-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  font-size: 0.85rem;
}

.software-info-row:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.software-info-row .label {
  color: var(--text-secondary);
}

.software-info-row .value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.launch-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-emerald), #059669);
  color: #031c12;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--neon-emerald-glow);
  transition: var(--trans-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.launch-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* ==========================================================================
   DEVELOPER & API SIMULATOR VIEW
   ========================================================================== */
.api-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.code-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-card-header {
  padding: 1rem 1.25rem;
  background: rgba(10, 14, 23, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-lang-selector {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}

.lang-btn.active {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
}

.code-block-wrapper {
  position: relative;
  max-height: 440px;
  overflow-y: auto;
}

.code-block {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
  background: #090c13;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Activity Log Styles */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.activity-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease forwards;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  transition: var(--trans-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.15rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(10, 14, 23, 0.4);
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: var(--trans-fast);
}

.form-control:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  background: rgba(15, 20, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: var(--trans-normal);
}

@keyframes slideToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.hiding {
  opacity: 0;
  transform: translateY(10px);
}

.toast-icon {
  font-size: 1.25rem;
  margin-top: -2px;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.toast-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.toast-success {
  border-left: 3px solid var(--neon-emerald);
}

.toast-success .toast-icon {
  color: var(--neon-emerald);
}

.toast-error {
  border-left: 3px solid var(--neon-rose);
}

.toast-error .toast-icon {
  color: var(--neon-rose);
}

.toast-info {
  border-left: 3px solid var(--neon-cyan);
}

.toast-info .toast-icon {
  color: var(--neon-cyan);
}

/* Custom Checkbox */
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-fast);
  position: relative;
}

.custom-checkbox:checked {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.custom-checkbox:checked::after {
  content: '✓';
  color: #000;
  font-size: 11px;
  font-weight: 800;
  display: block;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .api-view-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .view-switcher {
    order: 3;
    justify-content: center;
  }

  .reseller-profile {
    justify-content: space-between;
  }

  .main-wrapper {
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }
}

/* ==========================================================================
   PRIVATE RESELLER ADMIN SECURITY LOGIN GATE
   ========================================================================== */
.admin-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.admin-auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.admin-auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 18, 28, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.12);
  position: relative;
  overflow: hidden;
  animation: cardScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardScaleIn {
  from {
    transform: scale(0.94);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shakeCard {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

.admin-auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
}

.auth-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.12em;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  margin: 0 auto 1.5rem auto;
  width: fit-content;
}

.security-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.admin-auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.security-shield-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.15rem auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(157, 78, 221, 0.15));
  border: 1px solid rgba(0, 240, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.25);
}

.shield-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 240, 255, 0.4);
  animation: rotateShield 12s linear infinite;
}

@keyframes rotateShield {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.admin-auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  background: linear-gradient(90deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.95rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
}

.admin-input {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.8rem 2.8rem 0.8rem 2.6rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: var(--trans-normal);
}

.admin-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  background: rgba(18, 24, 38, 0.85);
}

.toggle-pwd-btn {
  position: absolute;
  right: 0.85rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  transition: var(--trans-fast);
}

.toggle-pwd-btn:hover {
  color: var(--text-primary);
}

.ip-indicator {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-auth-submit-btn {
  width: 100%;
  padding: 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-cyan), #0284c7);
  color: #020c15;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
  transition: var(--trans-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.admin-auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.45);
  filter: brightness(1.1);
}

.admin-auth-demo-hint {
  margin-top: 1.25rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

.admin-auth-demo-hint code {
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(0, 240, 255, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.admin-warning-banner {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  line-height: 1.4;
  text-align: center;
}