/**
 * NeoSocial - Main Stylesheet
 * Bootstrap 5 admin panel with dark mode support.
 */

/* -------------------------------------------------------------------------- */
/* CSS Custom Properties (Light / Dark Mode)                                  */
/* -------------------------------------------------------------------------- */

:root,
[data-bs-theme="light"] {
  --ns-sidebar-width: 270px;
  --ns-sidebar-collapsed-width: 72px;
  --ns-sidebar-bg: #ffffff;
  --ns-sidebar-border: #f1f5f9;
  --ns-sidebar-text: #64748b;
  --ns-sidebar-text-active: #5BB4F5;
  --ns-sidebar-hover: #eef8fe;
  --ns-sidebar-active: #e7f5fd;
  --ns-navbar-bg: #ffffff;
  --ns-navbar-border: #f1f5f9;
  --ns-body-bg: #f8fafc;
  --ns-card-bg: #ffffff;
  --ns-card-border: #f1f5f9;
  --ns-footer-bg: #ffffff;
  --ns-footer-border: #f1f5f9;
  --ns-text-primary: #0f172a;
  --ns-text-muted: #64748b;
  --ns-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --ns-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.05);
  --ns-transition: 0.2s ease;

  --fox-brand-orange: #5BB4F5;
  --fox-brand-blue: #5BB4F5;
  --fox-brand-primary: #5BB4F5;
  --fox-brand-secondary: #5BB4F5;
  --fox-accent-purple: #5BB4F5;
  --fox-accent-teal: #5BB4F5;
  --fox-accent-blue: #5BB4F5;
  --fox-node-border: rgba(255, 255, 255, 0.2);
  --fox-node-hover-bg: rgba(255, 255, 255, 0.18);
  --fox-surface-glass: rgba(255, 255, 255, 0.08);
  --fox-accent-orange: #5BB4F5;
  --fox-cream: #eef8fe;
  --bs-primary: #5BB4F5;
  --bs-primary-rgb: 91, 180, 245;
}

.fox-brand-logo {
  display: block;
  object-fit: contain;
}

.sidebar-brand-logo,
.header-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.fox-auth-logo {
  width: 72px;
  height: 72px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--fox-brand-primary);
  --bs-btn-border-color: var(--fox-brand-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #3fa3e8;
  --bs-btn-hover-border-color: #3fa3e8;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #2e94d6;
  --bs-btn-active-border-color: #2e94d6;
  --bs-btn-disabled-bg: #5BB4F5;
  --bs-btn-disabled-border-color: #5BB4F5;
  --bs-btn-focus-shadow-rgb: 91, 180, 245;
}

.btn-outline-primary {
  --bs-btn-color: var(--fox-brand-blue);
  --bs-btn-border-color: var(--fox-brand-blue);
  --bs-btn-hover-color: #062033;
  --bs-btn-hover-bg: var(--fox-brand-blue);
  --bs-btn-hover-border-color: var(--fox-brand-blue);
  --bs-btn-active-color: #062033;
  --bs-btn-active-bg: #4aa8e6;
  --bs-btn-active-border-color: #4aa8e6;
  --bs-btn-focus-shadow-rgb: 93, 185, 247;
}

.btn-dark {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--fox-brand-primary);
  --bs-btn-border-color: var(--fox-brand-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #3fa3e8;
  --bs-btn-hover-border-color: #3fa3e8;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #2e94d6;
  --bs-btn-active-border-color: #2e94d6;
  --bs-btn-disabled-bg: #5BB4F5;
  --bs-btn-disabled-border-color: #5BB4F5;
}

.btn-outline-dark {
  --bs-btn-color: var(--fox-brand-blue);
  --bs-btn-border-color: var(--fox-brand-blue);
  --bs-btn-hover-color: #062033;
  --bs-btn-hover-bg: var(--fox-brand-blue);
  --bs-btn-hover-border-color: var(--fox-brand-blue);
  --bs-btn-active-bg: #4aa8e6;
  --bs-btn-active-border-color: #4aa8e6;
  --bs-btn-active-color: #062033;
}

.text-primary {
  color: var(--fox-brand-orange) !important;
}

.form-check-input:checked {
  background-color: var(--fox-brand-orange);
  border-color: var(--fox-brand-orange);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--fox-brand-blue);
  box-shadow: 0 0 0 0.2rem rgba(93, 185, 247, 0.25);
}

[data-bs-theme="dark"] {
  --ns-sidebar-bg: #0f172a;
  --ns-sidebar-text: #94a3b8;
  --ns-sidebar-text-active: #f8fafc;
  --ns-sidebar-hover: #1e293b;
  --ns-sidebar-active: #3b82f6;
  --ns-navbar-bg: #1e293b;
  --ns-navbar-border: #334155;
  --ns-body-bg: #0f172a;
  --ns-card-bg: #1e293b;
  --ns-card-border: #334155;
  --ns-footer-bg: #1e293b;
  --ns-footer-border: #334155;
  --ns-text-primary: #f8fafc;
  --ns-text-muted: #94a3b8;
  --ns-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --ns-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */

html {
  /* Off-canvas drawers use transform/fixed; clip so they cannot expand page scrollWidth. */
  overflow-x: clip;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--ns-body-bg);
  color: var(--ns-text-primary);
  transition: background-color var(--ns-transition), color var(--ns-transition);
  overflow-x: clip;
  max-width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Admin Layout                                                               */
/* -------------------------------------------------------------------------- */

.admin-wrapper {
  /* Sidebar is position:fixed; block layout avoids flex min-content collapse
     when a page has wide tables/nav (e.g. Analytics). */
  display: block;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
}

.admin-content {
  display: flex;
  flex-direction: column;
  margin-left: var(--ns-sidebar-width);
  min-height: 100vh;
  width: auto;
  max-width: 100%;
  transition: margin-left var(--ns-transition);
  /* min-width:0 lets nested overflow regions shrink. Do NOT set overflow here — it clips
     header dropdowns (workspace switcher) so items look clickable but do not receive clicks. */
  min-width: 0;
  overflow: visible;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1.5rem 1.5rem;
  overflow-wrap: break-word;
  /* Contain wide tables/content here instead of clipping the whole shell. */
  overflow-x: auto;
}

.admin-main table {
  max-width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background-color: var(--ns-navbar-bg);
  border-bottom: 1px solid var(--ns-navbar-border);
  transition: background-color var(--ns-transition), border-color var(--ns-transition);
  position: sticky;
  top: 0;
  z-index: 1080;
  overflow: visible;
}

.header-left,
.header-workspace-slot,
.workspace-switcher {
  overflow: visible;
}

.workspace-switcher-menu {
  min-width: 240px;
  max-width: min(320px, 90vw);
  border-color: #f1f5f9;
  z-index: 1090;
  pointer-events: auto;
}

.workspace-switch-form {
  pointer-events: auto;
}

.workspace-switch-item {
  cursor: pointer;
  pointer-events: auto;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.header-left {
  flex: 1 1 auto;
}

.header-right {
  flex: 0 0 auto;
}

/* Workspace name and slug truncate instead of widening the header. */
.header-workspace {
  min-width: 0;
}

.header-workspace > * {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ns-text-primary);
  font-weight: 700;
  margin-left: 0.25rem;
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
}

.sidebar-collapse-btn,
.sidebar-toggle,
.theme-toggle,
.notification-btn,
.user-menu {
  color: var(--ns-text-muted);
  text-decoration: none;
  padding: 0.5rem;
}

.sidebar-collapse-btn:hover,
.sidebar-toggle:hover,
.theme-toggle:hover,
.user-menu:hover {
  color: var(--ns-text-primary);
}

.notification-btn {
  position: relative;
  opacity: 0.6;
  cursor: not-allowed;
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  display: none;
}

.user-avatar {
  font-size: 1.5rem;
  line-height: 1;
}

.user-name {
  font-weight: 500;
  color: var(--ns-text-primary);
}

/* -------------------------------------------------------------------------- */
/* FoxPoster compact page header (single system)                              */
/* -------------------------------------------------------------------------- */

.fp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  padding: 0.15rem 0 1rem;
  margin: 0 0 0.75rem;
  background: transparent;
}

.fp-page-header-copy {
  min-width: 0;
  flex: 1 1 12rem;
}

.fp-page-header .page-breadcrumb {
  margin: 0 0 0.2rem;
}

.fp-page-header .breadcrumb {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  --bs-breadcrumb-divider: '/';
  --bs-breadcrumb-divider-color: #94a3b8;
}

.fp-page-header .breadcrumb-item,
.fp-page-header .breadcrumb-item a,
.fp-page-header .breadcrumb-item.active {
  color: #94a3b8;
}

.fp-page-header .breadcrumb-item a {
  text-decoration: none;
}

.fp-page-header .breadcrumb-item a:hover {
  color: #64748b;
}

.fp-page-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fp-page-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

.fp-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #64748b;
  max-width: 46rem;
}

.fp-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 0 1 auto;
}

.fp-page-header-actions .btn {
  border-radius: 8px;
}

/* Flatten leftover decorative page heroes so they cannot compete with fp-page-header. */
.e1-agency-hero,
.e2-hero,
.e3-hero,
.e4-hero,
.e7-hero,
.e8-hero,
.d1-hero,
.d2-hero,
.d3-hero,
.d4-hero,
.d5-hero,
.d6-hero,
.c11-hero,
.cp-hero {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.e1-agency-hero > div:first-child,
.e2-hero > div:first-child,
.e3-hero > div:first-child,
.e4-hero > div:first-child,
.e7-hero > div:first-child,
.e8-hero > div:first-child,
.d1-hero > div:first-child,
.d2-hero > div:first-child,
.d3-hero > div:first-child,
.d4-hero > div:first-child,
.d5-hero > div:first-child,
.d6-hero > div:first-child,
.c11-hero > div:first-child,
.cp-hero > div:first-child {
  display: none;
}

.d1-hero .d1-score,
.d2-hero .d2-stat,
.d3-hero .d3-stat,
.d4-hero .d4-stat,
.d5-hero .d5-stat,
.d6-hero .d6-stat {
  color: #0f172a !important;
}

.d1-hero .small,
.d2-hero .small,
.d3-hero .small,
.d4-hero .small,
.d5-hero .small,
.d6-hero .small,
.c11-hero .small {
  color: #64748b !important;
  opacity: 1 !important;
}

.c10-hero {
  background: #fff !important;
  color: #0f172a !important;
}

.c10-hero .text-uppercase.small,
.c10-hero [style*="font-size:1.6rem"] {
  display: none;
}

.page-header-block,
.page-heading,
.page-subtitle {
  /* legacy aliases kept for older templates */
}

.page-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 767.98px) {
  .fp-page-header {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.75rem;
  }

  .fp-page-header-actions {
    justify-content: flex-start;
  }

  .fp-page-header-actions .btn {
    min-height: 36px;
  }
}

.flash-alert {
  margin-bottom: 1.25rem;
}

.intelligence-context-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.35rem;
  border: 1px solid var(--ns-card-border);
  border-radius: 14px;
  background: var(--ns-card-bg);
  scrollbar-width: thin;
}

.intelligence-context-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  color: var(--ns-text-muted);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.intelligence-context-nav a:hover,
.intelligence-context-nav a.active {
  color: #245b49;
  background: #e7f2ec;
}

/* -------------------------------------------------------------------------- */
/* Sidebar Collapsed State                                                    */
/* -------------------------------------------------------------------------- */

.admin-wrapper.sidebar-collapsed .admin-sidebar {
  width: var(--ns-sidebar-collapsed-width);
  overflow: hidden;
}

.admin-wrapper.sidebar-collapsed .admin-content {
  margin-left: var(--ns-sidebar-collapsed-width);
}

.admin-wrapper.sidebar-collapsed .sidebar-label,
.admin-wrapper.sidebar-collapsed .sidebar-collapse-hidden,
.admin-wrapper.sidebar-collapsed .sidebar-brand-text,
.admin-wrapper.sidebar-collapsed .sidebar-link-text,
.admin-wrapper.sidebar-collapsed .sidebar-version {
  display: none;
}

.admin-wrapper.sidebar-collapsed .sidebar-brand,
.admin-wrapper.sidebar-collapsed .sidebar-header,
.admin-wrapper.sidebar-collapsed .sidebar-logout,
.admin-wrapper.sidebar-collapsed .sidebar-footer > div {
  justify-content: center;
}

.admin-wrapper.sidebar-collapsed .sidebar-header,
.admin-wrapper.sidebar-collapsed .sidebar-nav,
.admin-wrapper.sidebar-collapsed .sidebar-footer,
.admin-wrapper.sidebar-collapsed .admin-sidebar > .px-3 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.admin-wrapper.sidebar-collapsed .sidebar-nav .nav-link,
.admin-wrapper.sidebar-collapsed .marky-nav-link,
.admin-wrapper.sidebar-collapsed .btn-marky-create-post,
.admin-wrapper.sidebar-collapsed .marky-workspace-selector {
  justify-content: center;
  gap: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--ns-sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color var(--ns-transition);
}

.sidebar-logout:hover {
  color: #f87171;
}

.sidebar-version {
  display: block;
  font-size: 0.75rem;
  transition: opacity var(--ns-transition);
}

@media (min-width: 992px) {
  .sidebar-toggle {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Sidebar                                                                    */
/* -------------------------------------------------------------------------- */

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--ns-sidebar-width);
  height: 100vh;
  background-color: var(--ns-sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform var(--ns-transition);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-brand i {
  font-size: 1.5rem;
  color: var(--ns-sidebar-active);
}

.sidebar-close {
  color: var(--ns-sidebar-text);
  padding: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--ns-sidebar-text);
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  transition: all var(--ns-transition);
  font-size: 0.9rem;
}

.sidebar-nav .nav-link i {
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
}

.sidebar-nav .nav-link:hover:not(.disabled) {
  background-color: var(--ns-sidebar-hover);
  color: var(--ns-sidebar-text-active);
}

.sidebar-nav .nav-link.active {
  background-color: var(--ns-sidebar-active);
  color: #ffffff;
}

.sidebar-nav .nav-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1035;
}

.sidebar-overlay.show {
  display: block;
}

/* -------------------------------------------------------------------------- */
/* Navbar                                                                     */
/* -------------------------------------------------------------------------- */

.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background-color: var(--ns-navbar-bg);
  border-bottom: 1px solid var(--ns-navbar-border);
  transition: background-color var(--ns-transition), border-color var(--ns-transition);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ns-text-primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-toggle,
.theme-toggle,
.user-menu {
  color: var(--ns-text-muted);
  text-decoration: none;
  padding: 0.5rem;
}

.sidebar-toggle:hover,
.theme-toggle:hover,
.user-menu:hover {
  color: var(--ns-text-primary);
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.admin-footer {
  padding: 1rem 1.5rem;
  background-color: var(--ns-footer-bg);
  border-top: 1px solid var(--ns-footer-border);
  transition: background-color var(--ns-transition), border-color var(--ns-transition);
}

/* -------------------------------------------------------------------------- */
/* Cards & Stats                                                              */
/* -------------------------------------------------------------------------- */

.card {
  background-color: var(--ns-card-bg);
  border-color: var(--ns-card-border);
  box-shadow: var(--ns-shadow);
  transition: background-color var(--ns-transition), border-color var(--ns-transition);
}

.card-header {
  background-color: transparent;
  border-bottom-color: var(--ns-card-border);
}

.stat-card {
  border: none;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ns-text-primary);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* -------------------------------------------------------------------------- */
/* Quick Actions                                                              */
/* -------------------------------------------------------------------------- */

.quick-action-card {
  background-color: var(--ns-body-bg);
  border: 1px dashed var(--ns-card-border);
  transition: all var(--ns-transition);
  cursor: default;
}

.quick-action-card:hover {
  border-style: solid;
  box-shadow: var(--ns-shadow);
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border-radius: 0.75rem;
  background-color: var(--ns-body-bg);
  border: 1px solid var(--ns-card-border);
  text-decoration: none;
  color: var(--ns-text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--ns-transition);
  height: 100%;
  min-height: 120px;
}

.quick-action-btn i {
  font-size: 1.75rem;
  color: var(--ns-sidebar-active);
}

.quick-action-btn:hover {
  border-color: var(--ns-sidebar-active);
  box-shadow: var(--ns-shadow);
  color: var(--ns-sidebar-active);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/* Activity List                                                              */
/* -------------------------------------------------------------------------- */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--ns-body-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ns-text-muted);
  border-bottom-color: var(--ns-card-border);
  padding: 0.875rem 1.25rem;
  background-color: var(--ns-body-bg);
}

.activity-table tbody td {
  padding: 0.875rem 1.25rem;
  vertical-align: middle;
  border-bottom-color: var(--ns-card-border);
}

.activity-table tbody tr:last-child td {
  border-bottom: none;
}

/* -------------------------------------------------------------------------- */
/* Placeholder Page                                                           */
/* -------------------------------------------------------------------------- */

.placeholder-card {
  border: 1px dashed var(--ns-card-border);
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--ns-sidebar-active);
}

.placeholder-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.placeholder-message {
  max-width: 480px;
}

.error-page-dashboard {
  padding: 3rem 1rem;
}

.error-page-dashboard .error-code {
  font-size: 5rem;
}

.error-page-dashboard .error-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* -------------------------------------------------------------------------- */
/* Platform Grid                                                              */
/* -------------------------------------------------------------------------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.platform-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--ns-body-bg);
  font-size: 0.85rem;
  font-weight: 500;
}

.platform-item i {
  font-size: 1.75rem;
}

/* -------------------------------------------------------------------------- */
/* Auth Pages                                                                 */
/* -------------------------------------------------------------------------- */

.auth-body {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  min-height: 100vh;
}

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 1rem;
}

.auth-logo-placeholder {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ffffff;
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #ffffff;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-form .input-group-text {
  background-color: var(--ns-body-bg);
  border-color: var(--ns-card-border);
}

.auth-forgot-link {
  color: var(--ns-text-muted);
  text-decoration: none;
  pointer-events: none;
  opacity: 0.6;
}

.auth-forgot-link:hover {
  color: var(--ns-text-muted);
}

/* -------------------------------------------------------------------------- */
/* Error Pages                                                                */
/* -------------------------------------------------------------------------- */

.error-page {
  padding: 3rem 1.5rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------------- */
/* Empty State                                                                */
/* -------------------------------------------------------------------------- */

.empty-state i {
  opacity: 0.4;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  /* Sidebar is position:fixed off-canvas on small screens. */
  .admin-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .admin-wrapper.sidebar-collapsed .admin-content {
    margin-left: 0;
  }

  .admin-main {
    max-width: 100%;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    width: var(--ns-sidebar-width) !important;
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }

  .sidebar-collapse-btn {
    display: none !important;
  }

  .intelligence-context-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 575.98px) {
  .admin-main {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-wrapper.no-sidebar .admin-content {
  margin-left: 0;
}

.admin-wrapper.no-sidebar .admin-sidebar {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Marky.ai Design System & Custom Components                                 */
/* -------------------------------------------------------------------------- */

.marky-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.025);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marky-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.avatar-square-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
}

.marky-workspace-selector {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.marky-workspace-selector:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-marky-create-post {
  background-color: var(--fox-brand-primary);
  border: 1.5px solid var(--fox-brand-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-marky-create-post:hover {
  border-color: #3fa3e8;
  color: #ffffff;
  background-color: #3fa3e8;
}

.marky-nav-link {
  color: #64748b;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.marky-nav-link:hover {
  color: #0f172a;
  background-color: #f8fafc;
}

.marky-nav-link.active {
  background-color: #eef8fe;
  color: var(--fox-brand-blue);
  font-weight: 600;
}

.marky-nav-link.active i {
  color: var(--fox-brand-primary);
}

/* Sidebar Widget Cards */
.marky-sidebar-widget {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 14px;
}

.marky-pill-btn {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 600;
  border-radius: 9999px;
  padding: 8px 18px;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}

.marky-pill-btn:hover {
  background-color: #1e293b;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Momentum Heatmap Matrix */
.momentum-heatmap {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 0;
}

.heatmap-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  background-color: #f1f5f9;
  transition: transform 0.15 ease;
}

.heatmap-cell.posted {
  background-color: var(--fox-brand-blue);
}

.heatmap-cell.scheduled {
  background-color: #c084fc;
}

/* Floating Bottom Quick Links Bar */
.marky-quick-links-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.quick-link-item {
  color: #475569;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-link-item:hover {
  color: var(--fox-brand-blue);
  background-color: #eef8fe;
}

/* -------------------------------------------------------------------------- */
/* FOXBOXO UX-4 — Interactive Marketing Intelligence Workspace Styles          */
/* -------------------------------------------------------------------------- */

.puzzle-node {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  outline: none;
}

.puzzle-node:hover {
  transform: translateY(-2px);
  background-color: var(--fox-node-hover-bg) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.puzzle-node:focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px;
}

/* UI-01 navigation chrome */
.fox-brand-mark {
  background: var(--fox-brand-orange);
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-brand-mark {
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 700;
}

.header-left,
.header-right {
  min-width: 0;
  position: relative;
  z-index: 2;
}

.header-search-slot {
  width: 220px;
}

.workspace-switcher-btn {
  width: 100%;
  border: 1px solid #f1f5f9;
  background: var(--fox-cream);
  border-radius: 12px;
  padding: 6px 10px;
}

.workspace-switcher-btn:hover,
.workspace-switcher-btn:focus-visible {
  border-color: #e9d5ff;
}

.workspace-switcher-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
  border-radius: 8px;
  background-color: #5b21b6;
  color: #fff;
}

.admin-header .btn.is-active {
  background: #eef8fe;
  color: var(--fox-brand-blue);
}

.marky-nav-link:focus-visible,
.launcher-tile:focus-visible,
.settings-hub-card:focus-visible,
.workspace-switcher-btn:focus-visible {
  outline: 2px solid var(--fox-brand-blue);
  outline-offset: 2px;
}

.marky-nav-link[aria-disabled="true"],
.marky-nav-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-marky-create-post {
  border: 1.5px solid var(--fox-brand-primary);
  color: #ffffff;
  background: var(--fox-brand-primary);
}

.btn-marky-create-post:hover,
.btn-marky-create-post.active {
  border-color: #3fa3e8;
  color: #ffffff;
  background-color: #3fa3e8;
}

.launcher-dropdown {
  width: min(420px, 92vw);
  max-height: min(80vh, 640px);
  overflow-y: auto;
}

.quick-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  z-index: 2000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.quick-settings-overlay.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.quick-settings-overlay[hidden] {
  display: none !important;
}

.quick-settings-drawer,
.app-launcher-panel {
  pointer-events: none;
  visibility: hidden;
}

.quick-settings-drawer {
  position: fixed;
  top: 0;
  /* Park fully off-screen when closed without a transform that expands scrollWidth */
  right: 0;
  width: min(360px, 100vw);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e8eaed;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.08);
  z-index: 2010;
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.2s ease, visibility 0.2s ease;
  contain: paint;
}

.quick-settings-drawer.is-open,
.app-launcher-panel.is-open {
  pointer-events: auto;
  visibility: visible;
}

.quick-settings-drawer.is-open {
  transform: translateX(0);
}

.app-launcher-panel {
  position: fixed;
  top: 64px;
  right: 16px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(80vh, 640px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  z-index: 2010;
  padding: 8px 12px 16px;
}

.app-launcher-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 12px;
}

.quick-settings-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}

.quick-settings-title {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin: 0;
}

.quick-settings-see-all {
  padding: 4px 20px 16px;
  border-bottom: 1px solid #e8eaed;
}

.quick-settings-see-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #dadce0;
  border-radius: 18px;
  color: var(--fox-brand-blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.quick-settings-see-all-btn:hover {
  background: #faf5ff;
  color: #5b21b6;
}

.quick-settings-drawer-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 8px 0 24px;
}

.quick-settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: #3c4043;
  text-decoration: none;
  font-size: 14px;
  background: transparent;
}

.quick-settings-row i {
  color: #5f6368;
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.quick-settings-row:hover,
.quick-settings-row.active {
  background: #f1f3f4;
  color: #202124;
}

.quick-settings-row:focus-visible {
  outline: 2px solid var(--fox-brand-blue);
  outline-offset: -2px;
}

body.quick-settings-open {
  overflow: hidden;
}

.launcher-section-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.launcher-grid-apps {
  gap: 4px 8px;
}

.launcher-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 16px;
  text-decoration: none;
  color: #3c4043;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
}

.launcher-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f4;
  color: var(--fox-brand-blue);
}

.launcher-tile i,
.launcher-icon i {
  font-size: 1.25rem;
  color: inherit;
}

.launcher-tile:hover {
  background: #f1f3f4;
  color: #202124;
}

.launcher-tile.active {
  background: #eef8fe;
  color: #5b21b6;
  box-shadow: inset 0 0 0 1px #ddd6fe;
}

.settings-hub-card {
  border: 1px solid #f1f5f9;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  min-height: 76px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.settings-hub-card:hover {
  border-color: #e9d5ff;
  background: #faf5ff;
}

.settings-hub-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fox-cream);
  color: var(--fox-accent-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .header-search-slot {
    width: 0;
  }

  .workspace-switcher-copy {
    display: none;
  }

  .launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

.hover-light:hover {
  background-color: #f8fafc !important;
}

/* Keyboard accessibility focus outlines */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--fox-brand-blue) !important;
  outline-offset: 2px;
}

/* Reduced Motion Respect */
@media (prefers-reduced-motion: reduce) {
  .puzzle-node, .marky-pill-btn, .quick-link-item, .card, .btn {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}


