body.admin-body {
  background: var(--color-bg-dark-prime) !important;
  font-family: var(--font-body), sans-serif !important;
}

/* Global Typography Enforcement */
h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: var(--font-display), sans-serif !important;
}

button,
input,
select,
textarea,
label {
  font-family: var(--font-display), sans-serif !important;
}

.font-mono,
code,
pre {
  font-family: var(--font-mono), monospace !important;
}

.dashboard-page .admin-sidebar {
  width: 320px;
  padding: 1.5rem 1.75rem 3rem;
  background: transparent;
  /* Permite glassmorphism del contenedor */
}

.dashboard-page .admin-nav ul {
  gap: 0.5rem;
}

.dashboard-page .admin-nav a {
  padding: 0.85rem 1rem;
}

.dashboard-page .tech-admin-main-content {
  margin-left: 0;
  padding: 0 0 3.25rem;
  /* No top padding — header is sticky and flush to viewport top */
  background: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* TOPBAR — Enforce height, background and typography */
#topbar-header,
.dashboard-page #topbar-header,
.tech-admin-main-content #topbar-header {
  min-height: 5rem !important;
  /* 80px - High premium feel */
  height: 5rem !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  background: rgba(13, 13, 18, 0.98) !important;
  /* obsidian near-solid */
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5) !important;
  font-family: var(--font-display), sans-serif !important;
  /* Outfit */
}

/* Topbar title */
#topbar-header h1,
.dashboard-page #topbar-header h1,
.tech-admin-main-content #topbar-header h1 {
  font-family: var(--font-display), sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #FFFFFF !important;
  margin: 0 !important;
}

/* Topbar subtitle */
#topbar-header p,
.dashboard-page #topbar-header p,
.tech-admin-main-content #topbar-header p {
  font-family: var(--font-body), sans-serif !important;
  font-size: 0.75rem !important;
  margin: 2px 0 0 !important;
  color: rgba(245, 245, 240, 0.5) !important;
  /* Ivory/50 */
}


/* BRAND BUTTONS - TECH PREMIUM STANDARDS */
.tech-admin-main-content button.btn-brand,
.tech-admin-main-content .btn-brand {
  border-radius: 1rem !important;
  /* rounded-xl (16px) */
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-admin-main-content .btn-teal {
  background: var(--color-accent) !important;
  color: var(--color-bg-dark-prime) !important;
  border: 1px solid rgba(45, 212, 191, 0.3) !important;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}

.tech-admin-main-content .btn-teal:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.4);
}

.tech-admin-main-content .btn-outline {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.tech-admin-main-content .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

.dashboard-page .admin-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

.dashboard-page .dashboard-main {
  padding: 0;
}

.dashboard-page .dashboard-hero {
  border-radius: 18px;
  margin-bottom: 0.65rem;
}

.dashboard-page .dashboard-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
}

.dashboard-page .dashboard-sidebar {
  position: sticky;
  top: 96px;
  height: fit-content;
}

.dashboard-page .sidebar-card {
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.dashboard-page .sidebar-card+.sidebar-card {
  margin-top: 1.5rem;
}

@media (max-width: 1280px) {
  .dashboard-page .dashboard-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-page .dashboard-sidebar {
    position: relative;
    top: 0;
  }
}

@media (max-width: 1024px) {
  .dashboard-page .admin-sidebar {
    width: min(304px, 90vw);
  }

  .dashboard-page .tech-admin-main-content {
    margin-left: 0;
    padding: 1.25rem 1.75rem 3rem;
  }
}

@media (max-width: 768px) {
  .dashboard-page .admin-sidebar {
    width: min(300px, 92vw);
  }

  .dashboard-page .admin-sidebar[data-state="hidden"] {
    transform: translateX(-100%);
  }

  .dashboard-page .admin-sidebar[data-state="visible"] {
    transform: translateX(0);
  }

  .dashboard-page .tech-admin-main-content {
    margin-left: 0;
    padding: 1rem 1.1rem 2.75rem;
  }

  .dashboard-page .dashboard-hero {
    border-radius: 12px;
    margin-bottom: 0.45rem;
  }

  .dashboard-page .admin-main-content>.mobile-menu-toggle {
    margin-bottom: 1rem;
  }

  .dashboard-page .dashboard-hero .hero-content {
    gap: 0.5rem;
  }
}

/* ==========================================================================
   DYNAMIC COMPONENT INJECTION FIXES (Tailwind CDN Bypass)
   ========================================================================== */
#adminSidebar {
  width: 18rem;
  /* w-72 */
  background-color: rgba(10, 10, 15, 0.8);
  /* bg-[#0A0A0F]/80 */
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  /* border-white/5 */
  position: fixed;
  height: 100vh;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

@media (min-width: 1024px) {
  #adminSidebar {
    position: relative;
    /* lg:relative */
  }
}

/* ==========================================================================
   CUSTOM SCROLLBAR (Tech Premium) - HIDDEN
   ========================================================================== */
/* Hide scrollbar for Chrome, Safari and Opera */
.custom-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Hide scrollbar for IE, Edge and Firefox */
.custom-scrollbar {
  -ms-overflow-style: none !important;
  /* IE and Edge */
  scrollbar-width: none !important;
  /* Firefox */
}

/* 
   TABLES - Tech Premium (User Management)
-------------------------------------------------------------------------- */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 245, 240, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono), monospace;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-table tbody tr:hover {
  background: rgba(45, 212, 191, 0.03);
  /* accent glow */
}

.admin-table td {
  padding: 1.15rem 1.5rem;
  vertical-align: middle;
  font-size: 0.9rem;
  color: rgba(245, 245, 240, 0.85);
}

/* User Cell: Avatar + Info */
.user-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-cell .user-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
  overflow: hidden;
}

.user-cell .user-avatar-circle.admin {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.user-cell .user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-cell .user-name {
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.user-cell .user-email {
  font-size: 0.75rem;
  color: rgba(245, 245, 240, 0.45);
  font-family: var(--font-mono), monospace;
}

/* Chips / Badges */
.admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.admin-chip-premium {
  background: rgba(251, 191, 36, 0.1);
  color: #FBBF24;
  border-color: rgba(251, 191, 36, 0.2);
}

.admin-chip-free {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 240, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-chip-admin {
  background: rgba(168, 85, 247, 0.1);
  color: #C084FC;
  border-color: rgba(168, 85, 247, 0.2);
}

.admin-chip-author {
  background: rgba(45, 212, 191, 0.1);
  color: #2DD4BF;
  border-color: rgba(45, 212, 191, 0.2);
}

.admin-chip-reader {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 240, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

/* User Actions - Inline Buttons */
.user-actions {
  display: flex;
  gap: 0.5rem;
}

.user-actions button {
  padding: 0.4rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 245, 240, 0.7);
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-actions button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.user-actions button:active:not(:disabled) {
  transform: translateY(0);
}

.user-actions button.action-premium:hover:not(:disabled) {
  border-color: rgba(251, 191, 36, 0.4);
  color: #FBBF24;
}

.user-actions button.action-admin:hover:not(:disabled) {
  border-color: rgba(168, 85, 247, 0.4);
  color: #C084FC;
}

.user-actions button.action-author:hover:not(:disabled) {
  border-color: rgba(45, 212, 191, 0.4);
  color: #2DD4BF;
}

.user-actions button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.self-note {
  font-size: 0.7rem;
  color: rgba(245, 245, 240, 0.4);
  font-style: italic;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  display: inline-block;
}

.pending-badge {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  font-size: 9px;
  text-transform: uppercase;
  border-radius: 4px;
  margin-left: 6px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}