/* ================================================
   ADMIN DASHBOARD MODERN ENHANCEMENTS
   Premium Styling, Glassmorphism, Smooth Animations
   ================================================ */

/* ============= ADMIN CONTAINER ENHANCEMENT ============= */
.admin-container {
  background: linear-gradient(135deg, #020817 0%, #0a1628 50%, #020817 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.admin-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(176, 0, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite;
}

/* ============= ADMIN SIDEBAR ============= */
.admin-sidebar {
  background: linear-gradient(180deg, rgba(12, 26, 46, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-right: 1px solid rgba(0, 240, 255, 0.15) !important;
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: slideInLeft 0.6s ease-out;
}

.sidebar-item {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border-left: 3px solid transparent;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #00f0ff 0%, #b000ff 100%);
  transform: scaleY(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 2px;
}

.sidebar-item:hover::before {
  transform: scaleY(1);
}

.sidebar-item:hover {
  background: rgba(0, 240, 255, 0.1) !important;
  transform: translateX(8px);
}

.sidebar-item.active {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.15) 0%, transparent 100%) !important;
}

/* ============= ADMIN HEADER/NAVBAR ============= */
.admin-header,
.admin-navbar {
  background: linear-gradient(90deg, rgba(12, 26, 46, 0.95) 0%, rgba(20, 35, 55, 0.9) 100%) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.1);
  animation: slideDown 0.5s ease-out;
}

/* ============= ADMIN CARDS & PANELS ============= */
.admin-card,
.dashboard-card,
.stat-card,
.panel-card {
  background: linear-gradient(135deg, rgba(12, 26, 46, 0.7) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(0, 240, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
}

.admin-card:hover,
.dashboard-card:hover,
.stat-card:hover,
.panel-card:hover {
  background: linear-gradient(135deg, rgba(12, 26, 46, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
  border-color: rgba(0, 240, 255, 0.5) !important;
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.4), inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.admin-card:nth-child(1) {
  animation-delay: 0.1s;
}

.admin-card:nth-child(2) {
  animation-delay: 0.2s;
}

.admin-card:nth-child(3) {
  animation-delay: 0.3s;
}

.admin-card:nth-child(4) {
  animation-delay: 0.4s;
}

.admin-card:nth-child(5) {
  animation-delay: 0.5s;
}

.admin-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* ============= STATS/METRICS ANIMATION ============= */
.stat-value {
  font-weight: 700;
  font-size: 2rem;
  background: linear-gradient(135deg, #00f0ff 0%, #0080ff 50%, #b000ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonGlow 3s ease-in-out infinite, slideInUp 0.6s ease-out;
}

.stat-label {
  color: rgba(241, 245, 249, 0.7);
  transition: color 0.3s ease;
}

.stat-card:hover .stat-label {
  color: #f1f5f9;
}

/* ============= TABLE STYLING ============= */
.admin-table,
.data-table {
  background: transparent;
  border-collapse: collapse;
}

.admin-table thead,
.data-table thead {
  background: rgba(0, 240, 255, 0.08);
  border-bottom: 2px solid rgba(0, 240, 255, 0.2);
}

.admin-table th,
.data-table th {
  padding: 16px !important;
  color: #00f0ff !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.admin-table tbody tr,
.data-table tbody tr {
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-table tbody tr:hover,
.data-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.15) !important;
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1);
  transform: translateX(4px);
}

.admin-table td,
.data-table td {
  padding: 14px 16px !important;
  color: #f1f5f9 !important;
  transition: all 0.3s ease;
}

/* ============= ADMIN BUTTONS ============= */
[class*="btn"],
[class*="button"] {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

[class*="btn"]::before,
[class*="button"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

[class*="btn"]:hover::before,
[class*="button"]:hover::before {
  left: 100%;
}

.btn-primary,
[class*="btn-primary"],
.admin-btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0080ff 50%, #b000ff 100%) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #000 !important;
  border: none !important;
}

.btn-primary:hover,
[class*="btn-primary"]:hover,
.admin-btn-primary:hover {
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.8), 0 0 60px rgba(0, 128, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.05);
}

.btn-secondary,
[class*="btn-secondary"],
.admin-btn-secondary {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%) !important;
  border: 1.5px solid rgba(129, 140, 248, 0.5) !important;
  color: #f1f5f9 !important;
}

.btn-secondary:hover,
[class*="btn-secondary"]:hover,
.admin-btn-secondary:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%) !important;
  border-color: rgba(0, 240, 255, 0.8) !important;
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.5);
  transform: translateY(-3px);
}

.btn-danger,
[class*="btn-danger"],
.admin-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover,
[class*="btn-danger"]:hover,
.admin-btn-danger:hover {
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.7);
  transform: translateY(-3px);
}

.btn-success,
[class*="btn-success"],
.admin-btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.btn-success:hover,
[class*="btn-success"]:hover,
.admin-btn-success:hover {
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.7);
  transform: translateY(-3px);
}

/* ============= FORM ELEMENTS ============= */
.admin-form input,
.admin-form textarea,
.admin-form select,
[class*="form"] input,
[class*="form"] textarea,
[class*="form"] select {
  background: rgba(12, 26, 46, 0.6) !important;
  border: 1px solid rgba(129, 140, 248, 0.2) !important;
  color: #f1f5f9 !important;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-form input::placeholder,
.admin-form textarea::placeholder,
[class*="form"] input::placeholder,
[class*="form"] textarea::placeholder {
  color: rgba(241, 245, 249, 0.5) !important;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
[class*="form"] input:focus,
[class*="form"] textarea:focus,
[class*="form"] select:focus {
  background: rgba(12, 26, 46, 0.8) !important;
  border-color: rgba(0, 240, 255, 0.6) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), inset 0 0 15px rgba(0, 240, 255, 0.1);
  transform: scale(1.01);
}

/* ============= MODAL/DIALOG ENHANCEMENT ============= */
.admin-modal,
[class*="modal"],
.dialog {
  background: linear-gradient(135deg, rgba(12, 26, 46, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.3), 0 0 100px rgba(0, 240, 255, 0.1);
  animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay,
[class*="overlay"] {
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
  animation: fadeIn 0.3s ease-out;
}

/* ============= ALERT/NOTIFICATION STYLING ============= */
.alert,
[class*="alert"],
.notification {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.3);
  animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.alert-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.alert-error,
.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.alert-info {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(0, 128, 255, 0.1) 100%);
  border-color: rgba(0, 240, 255, 0.4);
  color: #06b6d4;
}

/* ============= TABS/NAVIGATION ============= */
.admin-tabs,
[class*="tab"],
.nav-tabs {
  border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
}

.admin-tabs button,
[class*="tab"] button,
.nav-tabs button {
  color: rgba(241, 245, 249, 0.6) !important;
  border: none !important;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 12px 24px !important;
}

.admin-tabs button::after,
[class*="tab"] button::after,
.nav-tabs button::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00f0ff 0%, #b000ff 100%);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-tabs button:hover::after,
[class*="tab"] button:hover::after,
.nav-tabs button:hover::after,
.admin-tabs button.active::after,
[class*="tab"] button.active::after,
.nav-tabs button.active::after {
  width: 100%;
}

.admin-tabs button.active,
[class*="tab"] button.active,
.nav-tabs button.active {
  color: #00f0ff !important;
}

/* ============= SCROLL ANIMATIONS ============= */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes neonGlow {

  0%,
  100% {
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
  }

  50% {
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.8), 0 0 40px rgba(0, 240, 255, 0.5);
  }
}

@keyframes bgShift {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }
}

/* ============= RESPONSIVE IMPROVEMENTS ============= */
@media (max-width: 768px) {

  .admin-card,
  .dashboard-card,
  .stat-card {
    padding: 20px !important;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .admin-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-table {
    font-size: 0.875rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px !important;
  }
}

/* ============= LOADING SKELETON ============= */
.skeleton {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.2) 0%, rgba(168, 85, 247, 0.2) 50%, rgba(129, 140, 248, 0.2) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ============= PRINT STYLES ============= */
@media print {
  .admin-card {
    box-shadow: none;
    border-color: #ccc;
  }
}

/* Clean Vibe Overrides: Hide distracting global elements */
#mouseGlow,
.mouse-glow,
.ai-chat-btn,
#aiChatBtn {
  display: none !important;
}

/* Unified Scrollbar for a cleaner look */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.4);
}

/* ============= SYSTEM HEALTH WIDGET ============= */
.adm-health-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.adm-health-widget:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.health-pulse {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.health-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #10b981;
  border-radius: 50%;
  animation: healthPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  opacity: 0;
}

@keyframes healthPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.health-info {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.health-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(16, 185, 129, 0.7);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.health-status {
  font-size: 0.7rem;
  font-weight: 900;
  color: #10b981;
  letter-spacing: 0.02em;
}

/* ============= SPOTLIGHT SEARCH ENHANCEMENT ============= */
.adm-search {
  position: relative;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.adm-search:focus-within {
  width: 420px;
  transform: scale(1.02);
}

.adm-search input {
  padding-left: 40px !important;
  height: 40px;
  border-radius: 12px !important;
  background: rgba(12, 26, 46, 0.5) !important;
  border: 1.5px solid rgba(0, 240, 255, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.adm-search input:focus {
  border-color: rgba(0, 240, 255, 0.6) !important;
  background: rgba(12, 26, 46, 0.8) !important;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.adm-search-icon {
  left: 14px !important;
  font-size: 1rem !important;
  color: rgba(0, 240, 255, 0.6) !important;
}

/* ============= MOBILE OPTIMIZATIONS FOR NEW UI ============= */
@media (max-width: 1024px) {
  .adm-health-widget {
    display: none;
    /* Hide on smaller screens to save space */
  }
}