/* INVOXA: Theme controls and dark theme foundations */

/* ===== GLOBALER DARK MODE ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  box-shadow: 0 4px 14px -6px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  color: #4f46e5;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  font-size: 0.78rem;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.theme-toggle-sun {
  color: #f59e0b;
  opacity: 1;
}

.theme-toggle-moon {
  color: #64748b;
  opacity: 0.55;
}

.theme-toggle-track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #cbd5e1;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: background-color 0.25s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 9999px;
  background: white;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.3);
  transition: transform 0.25s ease;
}

html.dark .theme-toggle-track {
  background: #6366f1;
}

html.dark .theme-toggle-thumb {
  transform: translateX(1.25rem);
}

html.dark .theme-toggle-sun {
  color: #94a3b8;
  opacity: 0.55;
}

html.dark .theme-toggle-moon {
  color: #c4b5fd;
  opacity: 1;
}

.context-switch-btn,
.header-user-chip,
.header-logout-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.context-switch-btn {
  background: #111827;
  color: white;
  box-shadow: 0 5px 14px -7px rgba(15, 23, 42, 0.7);
}

.context-switch-btn:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.header-user-chip {
  max-width: 10rem;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.82);
  color: #374151;
}

.header-user-chip i {
  flex-shrink: 0;
}

.header-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logout-btn {
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.82);
  color: #dc2626;
}

.header-logout-btn:hover {
  border-color: #fecaca;
  background: #fef2f2;
}

#upgradeCustomerNavBtn {
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.dashboard-header-inner,
.dashboard-header-brand,
.dashboard-header-nav,
.dashboard-header-user-menu,
.dashboard-header-nav-link {
  flex-shrink: 0;
}

.dashboard-header-nav-link {
  white-space: nowrap;
}

.dashboard-header-nav {
  margin-right: 0.65rem;
}

.dashboard-header-user-menu {
  gap: 0.65rem !important;
}

.admin-hero {
  position: relative;
  background: linear-gradient(125deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%);
}

.admin-hero::after {
  content: '';
  position: absolute;
  width: 22rem;
  height: 22rem;
  right: -6rem;
  top: -11rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  background: white;
  box-shadow: 0 12px 25px -18px rgba(15, 23, 42, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -18px rgba(79, 70, 229, 0.35);
}

.admin-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 1rem;
  font-size: 1.15rem;
}

.admin-nav-tab {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.65rem 0.95rem;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.admin-nav-tab:hover,
.admin-nav-tab.is-active {
  background: #eef2ff;
  color: #4f46e5;
}

.admin-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.8rem;
  color: white;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  font-weight: 800;
}

.admin-select {
  width: 100%;
  max-width: 100%;
  min-width: 6.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-users-table-container {
  width: 100%;
  overflow-x: hidden;
}

.admin-users-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-users-table th,
.admin-users-table td {
  padding: 1rem 0.75rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.admin-users-table th:nth-child(1) { width: 23%; }
.admin-users-table th:nth-child(2) { width: 14%; }
.admin-users-table th:nth-child(3) { width: 14%; }
.admin-users-table th:nth-child(4) { width: 12%; }
.admin-users-table th:nth-child(5) { width: 10%; }
.admin-users-table th:nth-child(6) { width: 15%; }
.admin-users-table th:nth-child(7) { width: 12%; }

.admin-users-table td:first-child > div,
.admin-users-table td:first-child > div > div,
.admin-users-table td:last-child > div {
  min-width: 0;
}

.admin-users-table .admin-select {
  min-width: 0;
}

.admin-users-table .custom-select {
  min-width: 0;
}

.admin-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.35rem 0.7rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-plan-badge.is-pro {
  background: #fef3c7;
  color: #a16207;
}

.admin-plan-badge.is-basic {
  background: #e0f2fe; /* light blue */
  color: #0284c7; /* blue-700 */
}

.admin-plan-badge.is-premium {
  background: #f5f3ff;
  color: #7c3aed;
}

.premium-package-order {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.8rem;
  font-weight: 800;
}

.premium-package-move-btn {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: white;
  color: #475569;
  transition: all 0.2s ease;
}

.premium-package-move-btn:hover:not(:disabled) {
  border-color: #a5b4fc;
  background: #eef2ff;
  color: #4338ca;
}

.premium-package-move-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

