/* ========================================================
   HeyHans Pokémon Web App & Giveaway PWA - Unified Design System
   ======================================================== */

:root {
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --accent: #9333ea;
  --accent-glow: rgba(147, 51, 234, 0.15);
  --success: #059669;
  --success-glow: rgba(5, 150, 105, 0.15);
  --warning: #d97706;
  --text-main: #0f172a;
  --text-sub: #64748b;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-light);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  padding-bottom: 90px;
}

/* ========================================================
   SISTEMA DE MODALES Y FORMULARIOS
   ======================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.open {
  display: flex !important;
}

.modal-content {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
  padding: 24px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
}

.profile-modern-modal {
  max-width: 530px !important;
  width: 95% !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 24px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18) !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  text-align: left !important;
  position: relative !important;
}

.profile-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
  gap: 12px;
}

.profile-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.profile-avatar-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: contain;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  image-rendering: pixelated;
}

.profile-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #ffffff;
}

.profile-header-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.profile-nick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-nick-text {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.profile-role-tag {
  font-size: 10px;
  font-weight: 800;
  color: #7e22ce;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.profile-email-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-email-row svg {
  flex-shrink: 0;
  color: #94a3b8;
}

.profile-close-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  align-self: flex-start;
  flex-shrink: 0;
}

.profile-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.profile-nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 14px;
}

.profile-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.profile-tab-pill:hover {
  color: #0f172a;
}

.profile-tab-pill.active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  font-weight: 800;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.profile-form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.profile-form-label svg {
  color: #6366f1;
}

.profile-form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.profile-form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.profile-avatar-grid-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px;
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 8px !important;
  max-height: 185px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.profile-avatar-card {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0 auto;
  padding: 3px;
  box-sizing: border-box;
}

.profile-avatar-card:hover {
  border-color: #a5b4fc;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.profile-avatar-card.selected {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  transform: scale(1.05);
}

.profile-avatar-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.profile-btn-save {
  width: 100%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
  margin-top: 4px;
}

.profile-btn-save:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
  transform: translateY(-1px);
}

.profile-btn-admin {
  background: #a855f7;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.25);
}

.profile-btn-admin:hover {
  background: #9333ea;
  transform: translateY(-1px);
}

.profile-btn-logout {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.profile-btn-logout:hover {
  background: #fee2e2;
  border-color: #f87171;
}

.profile-btn-done {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-btn-done:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ========================================================
   WORKSPACE ADMIN PORTAL (OVERLAY FULL-PAGE ENLIGHTENED)
   ======================================================== */
.vortex-admin-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: none !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.vortex-admin-overlay.open {
  display: flex !important;
}

.vortex-workspace {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.vortex-sidebar {
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  height: 100vh !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 20px 16px !important;
  user-select: none !important;
  z-index: 10 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
}

.vortex-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.vortex-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
  font-weight: 900;
}

.vortex-brand-title {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.vortex-brand-sub {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.vortex-nav-section {
  margin-top: 16px;
}

.vortex-nav-label {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  padding: 0 10px 8px;
}

.vortex-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.vortex-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vortex-nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.vortex-nav-item.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 700;
}

.vortex-nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vortex-pill-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
}

.vortex-pill-live {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.vortex-pill-count {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.vortex-admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.vortex-admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.vortex-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: calc(100vw - 260px) !important;
  max-width: calc(100vw - 260px) !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  box-sizing: border-box !important;
}

.vortex-topbar {
  width: 100% !important;
  min-width: 0 !important;
  height: 64px !important;
  min-height: 64px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  z-index: 10 !important;
}

.vortex-search-box {
  width: 320px !important;
  max-width: 360px !important;
  min-width: 180px !important;
  height: 38px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 1 !important;
}

.vortex-search-input {
  width: 100% !important;
  height: 100% !important;
  padding: 0 38px 0 36px !important;
  font-size: 13px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

.vortex-search-input:focus {
  background: #ffffff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

.vortex-search-icon {
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  font-size: 14px !important;
  color: #94a3b8 !important;
  pointer-events: none !important;
}

.vortex-search-shortcut {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  background: #e2e8f0 !important;
  color: #64748b !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  pointer-events: none !important;
}

.vortex-topbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.vortex-online-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #059669 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.vortex-clock-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.vortex-btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  padding: 0 16px !important;
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25) !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.vortex-btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5) !important;
  transform: translateY(-1px) !important;
}

.vortex-btn-close {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

.vortex-btn-close:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

.vortex-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap !important;
}

.vortex-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.vortex-btn-delete {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.vortex-btn-delete:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25) !important;
}

.vortex-btn-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s ease;
}

.vortex-btn-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.vortex-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

#vortexViewUsers,
#vortexViewTrades,
#vortexViewChat,
#vortexViewBroadcast,
#vortexViewIps,
#vortexViewRoles {
  width: 100% !important;
  box-sizing: border-box !important;
}

.vortex-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

.vortex-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.vortex-metric-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.vortex-metric-title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vortex-metric-value {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.vortex-metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.badge-growth-green {
  color: #059669;
}

.badge-status-green {
  color: #059669;
}

.badge-status-amber {
  color: #d97706;
}

.vortex-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.vortex-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vortex-filter-pill {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vortex-filter-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.vortex-filter-pill.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.vortex-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vortex-dropdown {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

.vortex-split-layout {
  display: block;
  width: 100%;
}

.vortex-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.vortex-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.vortex-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid #e2e8f0;
}

.vortex-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  vertical-align: middle;
}

.vortex-table tr:hover td {
  background: #f8fafc;
}

.vortex-table tr.selected td {
  background: #f5f3ff;
  border-color: #ede9fe;
}

.vortex-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vortex-table-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  image-rendering: pixelated;
}

.vortex-user-name {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.vortex-user-id {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
}

.vortex-email-box {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
}

.vortex-copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.vortex-copy-btn:hover {
  color: #4f46e5;
}

.vortex-role-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.vortex-role-admin {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.vortex-role-verified {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.vortex-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.status-online {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-active {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.status-away {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.status-offline {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.status-suspended {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.vortex-inspector-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
}

.vortex-inspector-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.vortex-inspector-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
}

.vortex-inspector-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: contain;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  image-rendering: pixelated;
}

.vortex-inspector-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  border: 3px solid #ffffff;
}

.vortex-inspector-name {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

.vortex-inspector-role {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.vortex-inspector-badge-admin {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.vortex-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vortex-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.vortex-progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.vortex-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 4px;
}

.vortex-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vortex-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vortex-stat-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.vortex-stat-num {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.vortex-inspector-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vortex-action-row {
  display: flex;
  gap: 6px;
}

.vortex-action-btn-sm {
  flex: 1;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.vortex-action-btn-sm:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.vortex-action-btn-sm.active-verify {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.vortex-action-btn-sm.active-ban {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

#adminAuditModal,
#adminCreateUserModal {
  z-index: 100005 !important;
}

.vortex-modal-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  max-width: 480px;
  width: 95%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  box-sizing: border-box;
}

#adminAuditModal .vortex-modal-box {
  max-width: 780px !important;
  width: 95vw !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
}

.vortex-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vortex-form-label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.vortex-form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.vortex-form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.vortex-metric-label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vortex-metric-val {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.vortex-metric-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.vortex-sub-green { color: #059669; }
.vortex-sub-blue { color: #2563eb; }
.vortex-sub-amber { color: #d97706; }

.vortex-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vortex-select-control {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

.vortex-tool-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vortex-records-count {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

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

.vortex-inspector-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto;
}

.vortex-inspector-avatar-img {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: contain;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  image-rendering: pixelated;
}

.vortex-inspector-pill {
  font-size: 10px;
  font-weight: 800;
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  padding: 3px 10px;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: 0.5px;
}

.vortex-inspector-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.vortex-inspector-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.vortex-inspector-tier-tag {
  font-size: 10px;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  padding: 1px 6px;
  border-radius: 6px;
}

.vortex-stats-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.vortex-stat-box-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.vortex-stat-box-val {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
}

.vortex-btn-full-audit {
  width: 100%;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vortex-btn-full-audit:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.vortex-quick-actions-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.vortex-btn-action-small {
  flex: 1;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.vortex-btn-action-small:hover {
  background: #f8fafc;
}

.btn-action-ban {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-action-ban:hover {
  background: #fee2e2;
}

.btn-action-ip {
  background: #fff7ed;
  color: #ea580c;
  border-color: #fed7aa;
}

.btn-action-ip:hover {
  background: #ffedd5;
}

@media (max-width: 1080px) {
  .vortex-split-layout {
    grid-template-columns: 1fr;
  }
  .vortex-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .vortex-sidebar {
    display: none;
  }
  .vortex-metrics-grid {
    grid-template-columns: 1fr;
  }
  .vortex-workspace {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}
