/* =========================================================
   EverestSoftTech – ADMIN PANEL
   Dark/Light Theme Support
   ========================================================= */

:root {
  /* DARK THEME (Default) */
  --admin-bg: radial-gradient(circle at top, #020617, #020617);
  --admin-bg-solid: #020617;
  --admin-sidebar-bg: #030819;
  --admin-sidebar-border: rgba(15, 23, 42, 1);

  --admin-card-bg: radial-gradient(circle at top left, #020617, #020617);
  --admin-card-bg-solid: #020617;
  --admin-card-border: rgba(30, 64, 175, 0.35);
  --admin-card-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);

  --admin-text-main: #e5e7eb;
  --admin-text-muted: #9ca3af;
  --admin-text-sub: #6b7280;

  --admin-border: rgba(55, 65, 81, 0.9);
  --admin-input-bg: rgba(15, 23, 42, 0.95);
  --admin-input-border: rgba(55, 65, 81, 0.9);

  --admin-hover-bg: rgba(15, 23, 42, 0.98);
  --admin-hover-border: rgba(129, 140, 248, 0.9);

  --admin-accent-gradient: linear-gradient(90deg, #4f46e5, #ec4899);
  --primary-color: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.5);

  --bg-card-solid: #020617;
  --text-main: #e5e7eb;
  --border: rgba(55, 65, 81, 0.9);
  --user-nav-active-bg: linear-gradient(90deg, #4f46e5, #ec4899);
  --link: #6366f1;
}

:root[data-theme="light"] {
  /* LIGHT THEME */
  --admin-bg: #f3f4f6;
  --admin-bg-solid: #f3f4f6;
  --admin-sidebar-bg: #ffffff;
  --admin-sidebar-border: #e5e7eb;

  --admin-card-bg: #ffffff;
  --admin-card-bg-solid: #ffffff;
  --admin-card-border: #e5e7eb;
  --admin-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);

  --admin-text-main: #111827;
  --admin-text-muted: #4b5563;
  --admin-text-sub: #6b7280;

  --admin-border: #e5e7eb;
  --admin-input-bg: #ffffff;
  --admin-input-border: #d1d5db;

  --admin-hover-bg: #f9fafb;
  --admin-hover-border: #6366f1;

  --primary-glow: rgba(99, 102, 241, 0.2);
  --bg-card-solid: #ffffff;
  --text-main: #111827;
  --border: #d1d5db;
}

/* Break the admin shell out of the centered .page-shell */
.admin-dashboard-shell {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* escape page-shell max-width */
  min-height: 100vh;
  display: flex;
  background: var(--admin-bg);
  color: var(--admin-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.admin-dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  padding: 24px 5px 16px;
  background: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-sidebar-border);
  z-index: 40;
  overflow-y: auto;
}

/* Sidebar header / brand */

.admin-dashboard-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.admin-dashboard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-dashboard-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f9fafb;
}

.admin-dashboard-brand-text {
  display: flex;
  flex-direction: column;
}

.admin-dashboard-brand-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--admin-text-main);
}

.admin-dashboard-brand-subtitle {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
}

/* Collapse button */

.admin-sidebar-collapse {
  border: none;
  background: var(--admin-input-bg);
  color: var(--admin-text-muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s ease-out, color 0.15s ease-out,
    transform 0.12s ease-out;
}

.admin-sidebar-collapse:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Sidebar nav */

.admin-dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-dashboard-nav-section {
  margin-top: 10px;
  margin-bottom: 4px;
  padding-inline: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--admin-text-sub);
}

.admin-dashboard-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out,
    transform 0.12s ease-out;
}

.admin-dashboard-nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #020617, #020617);
  border: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--admin-text-muted);
}

.admin-dashboard-nav-label {
  white-space: nowrap;
}

.admin-dashboard-nav-item:hover {
  background: var(--admin-hover-bg);
  color: var(--admin-text-main);
  transform: translateY(-1px);
}

.admin-dashboard-nav-item:hover .admin-dashboard-nav-icon {
  border-color: rgba(96, 165, 250, 0.9);
  color: #e5e7eb;
}

.admin-dashboard-nav-item-active {
  background: linear-gradient(90deg, #1d4ed8, #7c3aed);
  color: #f9fafb;
}

.admin-dashboard-nav-item-active .admin-dashboard-nav-icon {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(191, 219, 254, 0.9);
  color: #f9fafb;
}

/* Sidebar footer */

.admin-dashboard-sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--admin-sidebar-border);
}

.admin-dashboard-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-dashboard-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--admin-input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text-main);
}

.admin-dashboard-user-meta {
  display: flex;
  flex-direction: column;
}

.admin-dashboard-user-email {
  font-size: 0.78rem;
  color: var(--admin-text-main);
}

.admin-dashboard-user-role {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
}

/* Role badges */

.user-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.95);
}

.user-role-admin {
  border-color: rgba(129, 140, 248, 0.95);
  color: #e0e7ff;
  background: rgba(79, 70, 229, 0.22);
}

.user-role-user {
  border-color: rgba(148, 163, 184, 0.9);
  color: #e5e7eb;
}

/* Status badges */

.user-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.user-status-active {
  border: 1px solid rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

.user-status-banned {
  border: 1px solid rgba(248, 113, 113, 0.9);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.4);
}

/* Edit link */

.admin-small-link {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.65);
  color: #e5e7eb;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.admin-small-link:hover {
  border-color: rgba(129, 140, 248, 0.95);
  transform: translateY(-1px);
}



/* ===========================
   ADMIN USER EDIT PAGE
   =========================== */

.admin-user-edit {
  margin-top: 8px;
}

.admin-user-edit-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-user-edit-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-user-email {
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
  word-break: break-all;
}

.admin-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-user-meta {
  text-align: right;
  font-size: 11px;
  color: #9ca3af;
}

.admin-user-meta-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-user-meta-value {
  color: #e5e7eb;
}

.admin-user-form {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 10px;
}

.admin-dashboard-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #f97373;
  text-decoration: none;
  background: rgba(30, 64, 175, 0.05);
  border: 1px solid rgba(248, 113, 113, 0.3);
  transition: background 0.15s ease-out, transform 0.12s ease-out,
    border-color 0.15s ease-out;
}

.admin-dashboard-logout:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.7);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   MAIN CONTENT
   --------------------------------------------------------- */

.admin-dashboard-main {
  flex: 1 1 auto;
  margin-left: 260px;
  /* space for sidebar */
  /* space for sidebar */
  padding: 26px 32px 40px;
  background: var(--admin-bg);
  color: var(--admin-text-main);
}

/* Plan Grid */

.admin-plans-create {
  margin-top: 10px;
}

.admin-plan-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Provider & status badges */

.payment-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--admin-border);
  background: var(--admin-input-bg);
}

/* Providers */
.payment-provider-stripe {
  border-color: rgba(59, 130, 246, 0.9);
  color: #bfdbfe;
}

.payment-provider-paypal {
  border-color: rgba(56, 189, 248, 0.9);
  color: #bae6fd;
}

.payment-provider-manual {
  border-color: rgba(148, 163, 184, 0.9);
  color: #e5e7eb;
}

/* Statuses */
.payment-status-paid {
  border-color: rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

.payment-status-pending {
  border-color: rgba(234, 179, 8, 0.9);
  color: #fef9c3;
  background: rgba(234, 179, 8, 0.18);
}

.payment-status-failed {
  border-color: rgba(248, 113, 113, 0.9);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.4);
}

.payment-status-refunded {
  border-color: rgba(129, 140, 248, 0.9);
  color: #e0e7ff;
  background: rgba(79, 70, 229, 0.22);
}

/* Card groups */

.settings-group-card {
  margin-bottom: 6px;
  padding: 10px 12px 12px;
  border-radius: 14px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
}

.settings-group-header {
  margin-bottom: 10px;
}

/* Reuse .admin-section-title and .admin-section-hint */

.settings-grid-1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.settings-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Responsive behavior */

@media (max-width: 900px) {
  .settings-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {

  .settings-grid-2,
  .settings-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Small subgroup label inside cards */

.settings-subgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-subtitle {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Save button row */

.settings-save-row {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}


/* Dashboard header */

.admin-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-dashboard-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--admin-text-sub);
  margin-bottom: 4px;
}

.admin-dashboard-title {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--admin-text-main);
}

.admin-dashboard-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}

.admin-dashboard-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-dashboard-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  background: var(--admin-input-bg);
}

/* Stats cards */

.admin-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.admin-dashboard-stat-card {
  border-radius: 18px;
  padding: 12px 14px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  box-shadow: var(--admin-card-shadow);
}

.admin-dashboard-stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 2px;
}

.admin-dashboard-stat-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e5e7eb;
}

.admin-dashboard-stat-foot {
  margin-top: 3px;
  font-size: 0.72rem;
  color: #6b7280;
}

.admin-dashboard-stat-users {
  border-top: 3px solid #4f46e5;
  border-radius: 10px;
}

.admin-dashboard-stat-animations {
  border-top: 3px solid #22c55e;
  border-radius: 10px;
}

.admin-dashboard-stat-credits {
  border-top: 3px solid #0ea5e9;
  border-radius: 10px;
}

.admin-dashboard-stat-revenue {
  border-top: 3px solid #f97316;
  border-radius: 10px;
}

/* Panels row */

.admin-dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}

.admin-dashboard-panel {
  border-radius: 18px;
  padding: 16px 16px 14px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  box-shadow: var(--admin-card-shadow);
}

.admin-dashboard-panel-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.admin-dashboard-panel-text {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

/* Usage table */

.admin-dashboard-usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-dashboard-usage-table td {
  padding: 6px 0;
  border-bottom: 1px dashed var(--admin-border);
}

.admin-dashboard-usage-table tr:last-child td {
  border-bottom: none;
}

.admin-dashboard-usage-table td:first-child {
  color: #9ca3af;
}

.admin-dashboard-usage-table td:last-child {
  text-align: right;
  color: var(--admin-text-main);
}

/* Quick links */

.admin-dashboard-quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-dashboard-quick-link {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--admin-input-bg);
  border: 1px solid rgba(30, 64, 175, 0.4);
  transition: background 0.15s ease-out, transform 0.12s ease-out,
    border-color 0.15s ease-out;
}

.admin-dashboard-quick-link:hover {
  background: rgba(30, 64, 175, 0.95);
  border-color: rgba(129, 140, 248, 0.9);
  transform: translateY(-2px);
}

.admin-dashboard-quick-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #4f46e5, #0f172a);
  color: #f9fafb;
  font-size: 0.85rem;
}

.admin-dashboard-quick-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--admin-text-main);
}

.admin-dashboard-quick-text {
  font-size: 0.75rem;
  color: #cbd5f5;
}

/* =========================================================
   GENERIC ADMIN FORMS / CARDS / TABLES
   (content UI – settings, users, plans, payments, etc.)
   ========================================================= */

.admin-section {
  margin-top: 18px;
}

.admin-card {
  border-radius: 18px;
  padding: 18px 18px 14px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  box-shadow: var(--admin-card-shadow);
}

/* Section header */

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  background: var(--admin-input-bg);
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-bottom: 8px;
}

.admin-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4cff1b;
  box-shadow: 0 0 10px rgba(22, 249, 62, 0.9);
}

.admin-dot-pink {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #e500d3;
  box-shadow: 0 0 10px rgba(186, 4, 232, 0.9);
}

.admin-dot-cynn {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #05d1ff;
  box-shadow: 0 0 10px rgba(0, 174, 226, 0.9);
}

.admin-title {
  margin: 6px 0 4px;
  font-size: 1.2rem;
  font-weight: 600;
}

.admin-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: var(--admin-text-muted);
}

.admin-section-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.admin-section-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

.admin-empty-text {
  font-size: 0.82rem;
  color: #6b7280;
}

/* Forms */

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-label {
  font-size: 0.78rem;
  color: var(--admin-text-main);
}

.admin-label small {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
}

.admin-input,
.admin-select,
.admin-textarea {
  width: 98%;
  border-radius: 14px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: #f9fafb;
  font-size: 0.85rem;
  padding: 7px;
  outline: none;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out,
    background 0.15s ease-out;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  border-color: rgba(129, 140, 248, 0.95);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.8);
  background: rgba(15, 23, 42, 1);
}

.admin-input::placeholder,
.admin-textarea::placeholder {
  color: var(--admin-text-muted);
}


/* Actions / buttons */

.admin-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* primary button */
.admin-btn-primary {
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  color: #f9fafb;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(79, 70, 229, 0.9);
  transition: transform 0.12s ease-out, box-shadow 0.15s ease-out,
    filter 0.12s ease-out;
}

.admin-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 18px 46px rgba(79, 70, 229, 1);
}

/* ghost button */
.admin-btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: transparent;
  padding: 7px 12px;
  font-size: 0.82rem;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease-out, border-color 0.15s ease-out;
}

.admin-btn-ghost:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(129, 140, 248, 0.9);
}

/* Tables */

.admin-table-wrap {
  border-radius: 12px;
  margin-top: 5px;
  border: 1px solid var(--admin-border);
  overflow: hidden;
  background: var(--admin-input-bg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-table thead {
  background: var(--admin-bg-solid);
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
  text-align: left;
  font-weight: 500;
  color: var(--admin-text-muted);
}

.admin-table tbody tr:nth-child(even) {
  background: var(--admin-input-bg);
}

.admin-table tbody tr:hover {
  background: rgba(30, 64, 175, 0.75);
}

/* badges / pills */

.pill-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
}

.pill-soft-small {
  padding: 2px 6px;
  font-size: 0.68rem;
}

.pill-soft-success {
  background: rgba(22, 163, 74, 0.1);
  color: #bbf7d0;
}

.pill-soft-warning {
  background: rgba(234, 179, 8, 0.08);
  color: #facc15;
}

.pill-soft-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.pill-soft-neutral {
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
}

/* Flash messages */

.flash {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.flash-success {
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.flash-error {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.85);
  color: #fecaca;
}

.flash-hide {
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* Text helpers */

.text-danger {
  color: #fecaca;
}

.text-success {
  color: #bbf7d0;
}

/* =========================================================
   RESPONSIVE / COLLAPSED SIDEBAR
   (keeps your existing JS that toggles .is-sidebar-collapsed)
   ========================================================= */

/* Collapsed sidebar on desktop */
.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-sidebar {
  width: 78px;
}

.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-main {
  margin-left: 78px;
}

.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-brand-text,
.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-nav-label,
.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-user-meta {
  display: none;
}

.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-sidebar {
  align-items: center;
}

.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-nav-item {
  justify-content: center;
}

.admin-dashboard-shell.is-sidebar-collapsed .admin-dashboard-nav-icon {
  margin-right: 0;
}

/* Mobile layout – sidebar slides in */
@media (max-width: 900px) {
  .admin-dashboard-shell {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
  }

  .admin-dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }


  /* class .is-sidebar-open should be toggled on #adminShell by JS */
  .admin-dashboard-shell.is-sidebar-open .admin-dashboard-sidebar {
    transform: translateX(0);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  }

  .admin-dashboard-main {
    margin-left: 0;
    padding: 20px 16px 28px;
  }

  .admin-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Very small screens */
@media (max-width: 600px) {
  .admin-dashboard-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tables – horizontal scroll on mobile */
@media (max-width: 900px) {
  .admin-table-wrap {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 720px;
  }
}

/* ---------- Mobile-only hamburger for admin sidebar ---------- */

/* Default: hide on desktop and everything */
.admin-mobile-topbar,
.admin-mobile-toggle {
  display: none;
}

/* Mobile breakpoint: show it only when window is narrow */
@media (max-width: 900px) {
  .admin-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
  }


  .admin-mobile-topbar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
  }

  .admin-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
    font-size: 1rem;
    transition:
      transform 0.12s ease-out,
      box-shadow 0.15s ease-out,
      background 0.15s ease-out;
  }

  .admin-mobile-toggle:hover {
    transform: translateY(-1px);
    background: rgba(30, 64, 175, 0.98);
    box-shadow: 0 14px 40px rgba(30, 64, 175, 0.95);
  }

  /* Hide the desktop collapse arrow on mobile */
  .admin-sidebar-collapse {
    display: none;
  }
}

/* Safety: REALLY hide hamburger on wide screens */
@media (min-width: 901px) {

  .admin-mobile-topbar,
  .admin-mobile-toggle {
    display: none !important;
  }
}

/* Backdrop behind sidebar on mobile when open */
.admin-sidebar-backdrop {
  display: none;
}

/* Mobile-only overlay */
@media (max-width: 900px) {
  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: #020617a6;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 40;
  }

  .admin-dashboard-shell.is-sidebar-open .admin-sidebar-backdrop {
    display: block;
  }

  .admin-dashboard-sidebar {
    z-index: 50;
  }

  .admin-dashboard-main {
    position: relative;
    z-index: 10;
  }
}

/* admin/signin.php for admin panel protection */

.admin-lock-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.admin-lock-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 40px 32px 32px;
  border-radius: 24px;
  background: var(--admin-bg);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.9),
    0 0 0 1px var(--admin-border);
}

.admin-lock-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.admin-lock-subtitle {
  margin-bottom: 28px;
  color: var(--admin-text-muted);
}

.admin-lock-icon {
  font-size: 60px;
  margin-bottom: 24px;
  color: var(--admin-text-muted);
}

.admin-lock-pill {
  border-radius: 999px;
  border: 1px solid rgba(156, 163, 175, 0.5);
  padding: 10px 22px;
  font-size: 0.9rem;
  margin-bottom: 28px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--admin-text-main);
}

.admin-lock-form .field-input {
  text-align: center;
  letter-spacing: 0.4em;
  font-weight: 600;
}

.admin-lock-hint {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-top: 8px;
}

/* --- BUTTONS --- */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  gap: 10px;
  border-radius: 999px;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);

}

.admin-btn-primary {
  background: var(--user-nav-active-bg);
  border: var(--border);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);

}

.admin-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  color: var(--text-main);

}

.admin-btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;

}

.admin-btn-secondary {
  background: var(--bg-card-solid);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  border: 1px solid var(--border);
  color: var(--text-main);

}

.admin-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(89, 0, 203, 0.7);

}

.admin-btn-danger {
  padding: 12px 28px;
  border-radius: 999px;
  color: var(--text-main);
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  background: #ff4848;
  margin-top: 20px;

}

.admin-btn-danger:hover {
  background: #ff0000;

}

/* Generic form fields */

.admin-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-faq-row-hidden {
  display: none;
}

.admin-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.admin-field-hint,
.admin-field-help {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

.admin-field-input,
.admin-field-input-file {
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--admin-input-border);
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
  width: 100%;
  box-sizing: border-box;
}


.admin-field-input:focus,
.admin-field-input-file:focus {
  outline: none;
  border-color: var(--border);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.8);
}

/* Custom file button */
.admin-field-input-file::-webkit-file-upload-button,
.admin-field-input-file::file-selector-button {
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  margin-right: 10px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #e5e7eb;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.7);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.1s ease;
}

.admin-field-input-file::-webkit-file-upload-button:hover,
.admin-field-input-file::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.85);
}

.admin-field-input-file::-webkit-file-upload-button:active,
.admin-field-input-file::file-selector-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.6);
}

/* Link-style helper */
.admin-field-link {
  font-size: 11px;
  color: var(--link);
}

/* =========================================================
   ADMIN – FOOTER BUILDER (scoped) clean layout for nav-foot.php
   ========================================================= */

.admin-footer-builder .admin-card {
  overflow: hidden;
}

/* Section spacing */
.admin-footer-builder .admin-section-title {
  margin-top: 18px;
}

.admin-footer-builder .admin-section-hint {
  margin-bottom: 14px;
}

/* Columns wrapper */
.admin-footer-builder #footerColumnsWrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Each column card */
.admin-footer-builder [data-col].settings-group-card {
  padding: 14px;
}

/* Column header row (Title + Remove column button) */
.admin-footer-builder [data-col]>.admin-form-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 14px;
}

/* Links area inside a column */
.admin-footer-builder [data-links] {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Each link row = 3 columns (Label, URL, Remove) */
.admin-footer-builder .admin-form-grid[data-link] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  align-items: end;
  gap: 12px 14px;
}

/* Make “Remove” buttons compact INSIDE footer builder only */
.admin-footer-builder .admin-btn-danger {
  margin-top: 0 !important;
  padding: 8px 12px;
  font-size: 0.78rem;
  line-height: 1;
  border-radius: 999px;
}

/* Actions spacing (Add link / Add column / Save) */
.admin-footer-builder .admin-actions {
  margin-top: 10px;
  gap: 10px;
}

/* Make inputs feel consistent */
.admin-footer-builder .admin-input,
.admin-footer-builder .admin-textarea {
  border-color: var(--admin-border);
}

/* Social grid: better spacing */
.admin-footer-builder .admin-form-grid {
  gap: 12px 16px;
}

/* Mobile: stack link row nicely */
@media (max-width: 900px) {
  .admin-footer-builder .admin-form-grid[data-link] {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-footer-builder [data-col]>.admin-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   FOOTER BUILDER (admin/nav-foot.php)
   Collapsible, clean, CodeCanyon-quality UI
   ========================================================= */

.admin-footer-builder .footer-columns-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-footer-builder .footer-columns-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-col-card {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  margin-bottom: 10px;
}

.footer-col-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-col-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.footer-col-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}

.footer-col-toggle:hover {
  background: var(--admin-hover-bg);
  border-color: var(--primary-color);
}

.footer-col-toggle i {
  transition: transform .15s ease;
}

.footer-col-card.is-collapsed .footer-col-toggle i {
  transform: rotate(-90deg);
}

.footer-col-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.footer-col-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--admin-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.footer-col-sub {
  font-size: .72rem;
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-col-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--admin-border);
}

.footer-col-card.is-collapsed .footer-col-body {
  display: none;
}

.footer-col-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

/* Link rows: Label | URL | Trash */
.footer-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.footer-mini-danger {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, .35);
  background: rgba(127, 29, 29, .25);
  color: #fecaca;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}

.footer-mini-danger:hover {
  background: rgba(248, 113, 113, .18);
  border-color: rgba(248, 113, 113, .7);
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .footer-col-name {
    max-width: 260px;
  }

  .footer-link-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   Missing Premium Classes (Added during audit)
   ========================================================= */

/* Settings Form Wrapper */
.admin-settings-form {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Plan Grid */
.admin-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* Help Text */
.admin-field-help,
.field-help {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--admin-text-sub);
  line-height: 1.4;
}

/* Inline Checkbox Label */
.admin-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--admin-text-main);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.admin-checkbox-inline input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* File Input Styling (Hidden real input, styled label) */
.admin-field-input-file {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}

.admin-field-input-file::file-selector-button {
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.2s;
}

.admin-field-input-file::file-selector-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Migrated Badges from profile.php */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 6px;
}

.badge-green {
  border: 1px solid rgba(34, 197, 94, 0.9);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

.badge-red {
  border: 1px solid rgba(248, 113, 113, 0.9);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.4);
}

.badge-yellow {
  border: 1px solid rgba(255, 193, 7, 0.9);
  color: #FFC107;
  background: rgba(255, 193, 7, 0.18);
}

.badge-outline {
  border: 1px solid #6b7280;
  color: #374151;
  background: #f9fafb;
}

/* Dark mode adjustment for outline badge */
:root[data-theme="dark"] .badge-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Migrated License Popup from video_status.php */
.license-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.license-popup {
  max-width: 420px;
  width: 90%;
  background: var(--admin-sidebar-bg);
  color: var(--admin-text-main);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--admin-border);
}

.license-popup h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: var(--admin-text-main);
}

.license-popup-text {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--admin-text-muted);
}

.license-popup-current {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--admin-text-muted);
}

.license-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.license-flash {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.license-flash-error {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.license-flash-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}