/* ==========================================================================
   XAMEI - PAINEL ADMINISTRATIVO PROFISSIONAL (COMMAND CENTER)
   Estilização Desktop-First, Otimizada para Performance e Visual SaaS
   ========================================================================== */

:root {
  --xamei-blue: #0066FF;
  --xamei-blue-dark: #0052CC;
  --xamei-blue-light: #3385FF;
  --xamei-gold: #FFB300;
  --xamei-gold-glow: rgba(255, 179, 0, 0.25);
  --xamei-green: #00C853;
  --xamei-green-glow: rgba(0, 200, 83, 0.25);
  --xamei-red: #FF3B30;
  --xamei-dark: #070B14;
  --xamei-surface: #0E1726;
  --xamei-card: #131E33;
  --xamei-border: #1E293B;
  --xamei-border-subtle: rgba(255, 255, 255, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 15, 29, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #2A374F;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3B4D6E;
}

/* Glassmorphism Panels */
.admin-card {
  background: linear-gradient(180deg, rgba(19, 30, 51, 0.85) 0%, rgba(13, 20, 36, 0.95) 100%);
  border: 1px solid var(--xamei-border-subtle);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.admin-card:hover {
  border-color: rgba(0, 102, 255, 0.3);
}

.admin-glass-header {
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--xamei-border);
}

/* Sidebar Item Styling */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94A3B8;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.nav-item:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(0, 102, 255, 0.2) 0%, rgba(0, 102, 255, 0.08) 100%);
  border-left: 3px solid var(--xamei-blue);
  font-weight: 600;
}
.nav-item.active i {
  color: var(--xamei-blue-light);
}

/* Badges */
.badge-online {
  background: rgba(0, 200, 83, 0.15);
  color: #4ADE80;
  border: 1px solid rgba(0, 200, 83, 0.3);
}
.badge-busy {
  background: rgba(0, 102, 255, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(0, 102, 255, 0.3);
}
.badge-waiting {
  background: rgba(255, 179, 0, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(255, 179, 0, 0.3);
}
.badge-offline {
  background: rgba(100, 116, 139, 0.2);
  color: #94A3B8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.badge-alert {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Shimmer & Glow Effects */
.glow-pulse-blue {
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.35);
  animation: glowPulse 2.5s infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 102, 255, 0.25); }
  50% { box-shadow: 0 0 25px rgba(0, 102, 255, 0.45); }
}

/* Map Container Styling — maximizado para tela cheia */
#adminLiveMap {
  min-height: calc(100vh - 220px);
  height: 75vh;
  width: 100%;
  border-radius: 1rem;
  z-index: 10;
  background-color: #0E1726;
}

/* Mission / Gamification Cards */
.mission-card {
  background: linear-gradient(135deg, rgba(19, 30, 51, 0.9) 0%, rgba(10, 18, 38, 0.95) 100%);
  border: 1px solid var(--xamei-border-subtle);
  border-radius: 1.25rem;
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--xamei-blue), #8B5CF6, var(--xamei-gold));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mission-card:hover::before {
  opacity: 1;
}
.mission-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
}

/* Progress Ring SVG */
.mission-progress-ring {
  transform: rotate(-90deg);
}
.mission-progress-ring circle.track {
  stroke: rgba(255, 255, 255, 0.08);
}
.mission-progress-ring circle.fill {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification Creative Preview */
.creative-preview {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px dashed rgba(0, 102, 255, 0.3);
  border-radius: 1rem;
  transition: all 0.2s ease;
}
.creative-preview:hover {
  border-color: var(--xamei-blue);
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
}

/* Badge de Status das Missões */
.badge-mission-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(0, 102, 255, 0.2));
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.35);
}
.badge-mission-expired {
  background: rgba(100, 116, 139, 0.15);
  color: #94A3B8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.badge-mission-draft {
  background: rgba(255, 179, 0, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(255, 179, 0, 0.3);
}

/* Push notification pulse */
@keyframes pushPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(0, 102, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 102, 255, 0); }
}
.push-send-btn {
  animation: pushPulse 2s infinite;
}
.admin-dark-tiles {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}
.leaflet-popup-content-wrapper {
  background: #0D1627 !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 1rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
}
.leaflet-popup-tip {
  background: #0D1627 !important;
}

/* Custom Marker Pins */
.fleet-marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}
.fleet-marker-pin:hover {
  transform: scale(1.25);
  z-index: 9999;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.admin-table th {
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94A3B8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(14, 23, 38, 0.8);
}
.admin-table td {
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: #E2E8F0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modal Overlay */
.admin-modal-overlay {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
}

/* ==========================================================================
   TELA DE LOGIN XAMEI ADMIN (SPLIT-SCREEN HERO DESIGN)
   ========================================================================== */
.admin-login-bg {
  background-color: #050B17;
  background-image: radial-gradient(circle at 10% 20%, rgba(0, 102, 255, 0.15) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(245, 184, 66, 0.08) 0%, transparent 40%);
}

.admin-login-card {
  background: rgba(12, 19, 35, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 102, 255, 0.1);
}

.admin-login-input {
  background: rgba(10, 15, 29, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  transition: all 0.2s ease;
}

.admin-login-input:focus {
  border-color: #0066FF !important;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.25) !important;
  background: rgba(14, 23, 42, 0.95) !important;
}

.admin-login-btn {
  background: linear-gradient(135deg, #FFB800 0%, #FFA000 100%);
  color: #0A0F1D;
  font-weight: 800;
  transition: all 0.2s ease;
}

.admin-login-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -5px rgba(255, 184, 0, 0.4);
}

.admin-login-btn:active {
  transform: translateY(0);
}
