/* ==========================================================================
   EarnifyX Lab - Core Stylesheet
   Designed for High Performance, Minimal Clean SaaS Aesthetics & GitHub Pages
   ========================================================================== */

:root {
  /* Color Palette - Light Mode (Default) */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-sidebar: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Accent Colors */
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-primary-light: #eff6ff;
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;
  
  /* Status Badges */
  --badge-success-bg: #ecfdf5;
  --badge-success-text: #059669;
  --badge-success-border: #a7f3d0;
  
  --badge-warning-bg: #fffbeb;
  --badge-warning-text: #d97706;
  --badge-warning-border: #fde68a;
  
  --badge-primary-bg: #eff6ff;
  --badge-primary-text: #2563eb;
  --badge-primary-border: #bfdbfe;

  --badge-purple-bg: #f5f3ff;
  --badge-purple-text: #7c3aed;
  --badge-purple-border: #ddd6fe;

  /* Layout */
  --sidebar-width: 250px;
  --rightbar-width: 280px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-primary: #0b0f17;
  --bg-surface: #111827;
  --bg-surface-subtle: #1e293b;
  --bg-sidebar: #0f172a;
  --border-color: #1e293b;
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-primary-light: rgba(59, 130, 246, 0.15);

  --badge-success-bg: rgba(5, 150, 105, 0.2);
  --badge-success-text: #34d399;
  --badge-success-border: rgba(5, 150, 105, 0.4);

  --badge-warning-bg: rgba(217, 119, 6, 0.2);
  --badge-warning-text: #fbbf24;
  --badge-warning-border: rgba(217, 119, 6, 0.4);

  --badge-primary-bg: rgba(37, 99, 235, 0.2);
  --badge-primary-text: #60a5fa;
  --badge-primary-border: rgba(37, 99, 235, 0.4);

  --badge-purple-bg: rgba(124, 58, 237, 0.2);
  --badge-purple-text: #a78bfa;
  --badge-purple-border: rgba(124, 58, 237, 0.4);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--accent-primary); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--text-muted);
}

.btn-subtle {
  background: transparent;
  color: var(--text-secondary);
}

.btn-subtle:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.btn-icon:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  line-height: 1;
  letter-spacing: 0.02em;
}

.badge-success {
  background-color: var(--badge-success-bg);
  color: var(--badge-success-text);
  border-color: var(--badge-success-border);
}

.badge-warning, .badge-premium {
  background-color: var(--badge-warning-bg);
  color: var(--badge-warning-text);
  border-color: var(--badge-warning-border);
}

.badge-primary, .badge-new {
  background-color: var(--badge-primary-bg);
  color: var(--badge-primary-text);
  border-color: var(--badge-primary-border);
}

.badge-purple {
  background-color: var(--badge-purple-bg);
  color: var(--badge-purple-text);
  border-color: var(--badge-purple-border);
}

/* ==========================================================================
   Header / Top Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.1rem 0 1.2rem;
  box-shadow: var(--shadow-xs);
  gap: 1rem;
}

[data-theme="dark"] .site-header {
  background-color: rgba(17, 24, 39, 0.94);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-logo .flask-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.08));
  border: 1px solid rgba(37,99,235,0.12);
}

.brand-logo .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-logo .brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--text-primary);
}

.brand-logo .brand-title span {
  color: var(--accent-primary);
}

.brand-logo .brand-tagline {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Center Top Navigation Menu */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
  margin: 0 auto;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.52rem 0.72rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.header-nav-link:hover {
  color: var(--accent-primary);
  background-color: var(--bg-surface-subtle);
}

.header-nav-link.active {
  color: var(--accent-primary);
  background-color: var(--accent-primary-light);
  font-weight: 600;
}

/* Header Dropdown (More) */
.header-dropdown {
  position: relative;
}

.header-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-dropdown-btn:hover,
.header-dropdown:hover .header-dropdown-btn,
.header-dropdown.active .header-dropdown-btn {
  color: var(--accent-primary);
  background-color: var(--bg-surface-subtle);
}

.dropdown-chevron {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.header-dropdown:hover .dropdown-chevron,
.header-dropdown.active .dropdown-chevron {
  transform: rotate(180deg);
}

.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 250px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 150;
}

.header-dropdown.active .header-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--accent-primary);
}

.dropdown-item.active {
  background-color: var(--accent-primary-light);
  color: var(--accent-primary);
}

.dropdown-item .item-icon {
  font-size: 1.15rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.dropdown-item .item-text {
  display: flex;
  flex-direction: column;
}

.dropdown-item .item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropdown-item .item-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Header Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: auto;
}

.header-search {
  position: relative;
  width: 220px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search:hover {
  width: 245px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.88rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-search:hover .search-input-wrapper .search-icon {
  color: var(--accent-primary);
  transform: scale(1.1);
}

.search-input-wrapper input {
  width: 100%;
  height: 38px;
  padding: 0 52px 0 34px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-input-wrapper input:focus,
.header-search:hover .search-input-wrapper input {
  background-color: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.search-shortcut-badge {
  position: absolute;
  right: 8px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-saved-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.header-saved-btn:hover {
  background-color: var(--bg-surface);
  color: #ef4444;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.header-saved-btn .saved-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  line-height: 1;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.4);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.header-auth-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.app-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  width: 100%;
  flex: 1;
}

/* Full Width Container (Used in dedicated catalog/detail/login pages) */
.app-container.full-width,
.app-container.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1440px;
}

/* Admin panel: fixed sidebar + fluid content on desktop, drawer on mobile */
.app-container.admin-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1560px;
}

.admin-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

@media (max-width: 1024px) {
  .app-container.admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    border-radius: 0;
    z-index: 200;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .admin-sidebar.open {
    left: 0;
  }
}

/* ==========================================================================
   Community Hub & Stay Updated Section
   ========================================================================== */
.community-hub-section {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 3rem 2rem;
  margin: 3rem 0 1.5rem 0;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.community-hub-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #25D366, #0088cc, #FF0000, #E1306C, var(--accent-primary));
}

.community-hub-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
}

.community-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-light);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.community-hub-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.community-hub-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 4-Card Community Channels Grid */
.community-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
  .community-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .community-cards-grid {
    grid-template-columns: 1fr;
  }
}

.community-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.community-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.community-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.community-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.25s ease;
}

.community-card:hover .community-icon-box {
  transform: scale(1.1);
}

/* Channel Specific Theme Accents */
.community-card.whatsapp {
  border-top: 3px solid #25D366;
}
.community-card.whatsapp .community-icon-box {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
}

.community-card.youtube {
  border-top: 3px solid #FF0000;
}
.community-card.youtube .community-icon-box {
  background: rgba(255, 0, 0, 0.12);
  color: #FF0000;
}

.community-card.telegram {
  border-top: 3px solid #0088cc;
}
.community-card.telegram .community-icon-box {
  background: rgba(0, 136, 204, 0.12);
  color: #0088cc;
}

.community-card.instagram {
  border-top: 3px solid #E1306C;
}
.community-card.instagram .community-icon-box {
  background: rgba(225, 48, 108, 0.12);
  color: #E1306C;
}

.community-mini-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.community-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.community-card-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

/* Custom Channel Action Buttons */
.community-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  color: #ffffff !important;
}

.community-btn.whatsapp-btn {
  background-color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}
.community-btn.whatsapp-btn:hover {
  background-color: #20ba5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.community-btn.youtube-btn {
  background-color: #FF0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.25);
}
.community-btn.youtube-btn:hover {
  background-color: #e00000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.35);
}

.community-btn.telegram-btn {
  background-color: #0088cc;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
}
.community-btn.telegram-btn:hover {
  background-color: #0077b5;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.35);
}

.community-btn.instagram-btn {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.25);
}
.community-btn.instagram-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(225, 48, 108, 0.35);
}

/* VIP Newsletter Box Inside Hub */
.community-newsletter-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}

.newsletter-box-text {
  flex: 1;
  min-width: 280px;
}

.newsletter-box-text h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.newsletter-box-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.newsletter-box-form-wrapper {
  flex: 1;
  min-width: 320px;
}

.newsletter-banner-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.newsletter-banner-input {
  flex: 1;
  min-width: 220px;
  height: 44px;
  padding: 0 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.newsletter-banner-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.newsletter-trust-tags {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.newsletter-trust-tags span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Left sidebar is intentionally hidden on desktop to keep the clean header-first layout */
.app-sidebar {
  display: none;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.sidebar-link .link-icon {
  font-size: 1.1rem;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--accent-primary);
}

.sidebar-link.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.75rem 0;
}

/* Go Premium Sidebar Widget */
.sidebar-premium-card {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(219, 234, 254, 0.9) 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .sidebar-premium-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(17, 24, 39, 0.9) 100%);
  border-color: #334155;
}

.premium-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.premium-crown-icon {
  font-size: 1.2rem;
}

.premium-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.premium-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.btn-upgrade {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.45rem;
  background-color: var(--accent-primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-upgrade:hover {
  background-color: var(--accent-primary-hover);
}

/* ==========================================================================
   Center Main Content Area
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

/* Hero Banner matching the screenshot */
.hero-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-xl);
  padding: 2.35rem 2.6rem;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-xs);
}

[data-theme="dark"] .hero-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}

.hero-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.hero-title {
  font-size: clamp(2.2rem, 3.3vw, 3.15rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.hero-title .title-accent {
  color: var(--accent-primary);
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.8rem;
  margin-bottom: 1.5rem;
  max-width: 480px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.hero-visual-img {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 1.94 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: block;
  transform: scale(1.18);
  transform-origin: center center;
}

/* ==========================================================================
   Badges & Status Tags Design System
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.badge-success, .badge-free {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .badge-success, [data-theme="dark"] .badge-free {
  background-color: rgba(5, 150, 105, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.badge-primary, .badge-new {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

[data-theme="dark"] .badge-primary, [data-theme="dark"] .badge-new {
  background-color: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.25);
}

.badge-warning, .badge-premium {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

[data-theme="dark"] .badge-warning, [data-theme="dark"] .badge-premium {
  background-color: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.25);
}

.badge-purple {
  background-color: #faf5ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

[data-theme="dark"] .badge-purple {
  background-color: rgba(124, 58, 237, 0.15);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.25);
}

.badge-subtle {
  background-color: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Section Headers & Grids
   ========================================================================== */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.section-icon {
  font-size: 1.35rem;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.see-all-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-primary);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.see-all-link:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

/* Card Grid Layouts */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.25rem;
}

.cards-grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cards-grid-wide {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ==========================================================================
   Standard Resource / Extension / Software / Tool Card
   ========================================================================== */
.item-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 225px;
}

.item-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .item-card:hover {
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(37, 99, 235, 0.3);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.95rem;
}

.card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-card:hover .card-icon-box {
  transform: scale(1.08) rotate(2deg);
}

.card-title {
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.28;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.item-card:hover .card-title {
  color: var(--accent-primary);
}

.card-description {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.48;
  margin-bottom: 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-action {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-action-btn {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--accent-primary-light);
  border: 1px solid rgba(37, 99, 235, 0.15);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.card-action-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.card-bookmark-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-bookmark-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.18);
}

.card-bookmark-btn.saved {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #ef4444;
}

/* ==========================================================================
   Prompt Cards & Detail Specifics
   ========================================================================== */
.prompt-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 230px;
}

.prompt-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.12);
}

.prompt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.prompt-category-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prompt-body-preview {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-sans);
}

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
}

/* ==========================================================================
   Blog & Tutorial Cards
   ========================================================================== */
.article-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.12);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.article-thumb {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background-color: var(--bg-surface-subtle);
}

.article-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.article-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Right Info / Sidebar Column (Desktop)
   ========================================================================== */
.app-rightbar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  max-height: calc(100vh - var(--header-height) - 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.app-rightbar::-webkit-scrollbar {
  width: 5px;
}

.app-rightbar::-webkit-scrollbar-track {
  background: transparent;
}

.app-rightbar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 999px;
}

.app-rightbar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* User Welcome Card */
.user-welcome-card {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.user-welcome-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary, #8b5cf6));
  opacity: 0.85;
}

.user-welcome-card:hover {
  border-color: var(--accent-primary-light);
  box-shadow: var(--shadow-md);
}

.welcome-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.welcome-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.4;
}

.btn-login-account {
  width: 100%;
  font-size: 0.86rem;
  padding: 0.65rem 1rem;
  background-color: var(--accent-primary);
  color: #ffffff !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
}

.btn-login-account:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Stat Badges Grid */
.stats-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1.1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.95rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.55rem 0.25rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  background-color: var(--accent-primary-light);
  box-shadow: var(--shadow-xs);
}

.stat-icon {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
  transition: transform 0.2s ease;
}

.stat-box:hover .stat-icon {
  transform: scale(1.15);
}

.stat-number {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  transition: color 0.2s ease;
}

.stat-box:hover .stat-number {
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Quick Links Card */
.quick-links-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.quick-links-card:hover {
  border-color: var(--accent-primary-light);
}

.card-widget-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.quick-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  list-style: none;
}

.quick-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  background-color: transparent;
}

.quick-link-item:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--accent-primary);
  transform: translateX(3px);
}

.quick-link-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.quick-link-arrow {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-link-item:hover .quick-link-arrow {
  transform: translateX(2px);
  color: var(--accent-primary);
}

/* Newsletter Widget */
.newsletter-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.newsletter-card:hover {
  border-color: var(--accent-primary-light);
}

.newsletter-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.newsletter-form {
  display: flex;
  gap: 0.4rem;
}

.newsletter-input {
  flex: 1;
  height: 38px;
  padding: 0 0.75rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  outline: none;
  color: var(--text-primary);
}

.newsletter-input:focus {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface);
}

/* ==========================================================================
   Category Filter Tabs / Pills
   ========================================================================== */
.filter-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.3rem 0;
  scrollbar-width: none;
}

.filter-pills-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.filter-pill.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.3rem;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-subtle);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background-color: var(--border-color);
}

.prompt-full-box {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-primary);
  margin: 1.25rem 0;
  max-height: 380px;
  overflow-y: auto;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-item {
  background-color: var(--text-primary);
  color: var(--bg-surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 1.5rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.85rem;
  max-width: 320px;
  line-height: 1.5;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.social-icon-btn:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  list-style: none;
}

.footer-links-list a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links-list a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Admin Dashboard & Management Table Styles
   ========================================================================== */
.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-data-table th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-surface-subtle);
}

.admin-data-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  transition: background 0.15s ease;
}

.admin-data-table tbody tr:hover td {
  background: var(--bg-surface-subtle);
}

.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.admin-form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.admin-form-input, .admin-form-select, .admin-form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-form-input:focus, .admin-form-select:focus, .admin-form-textarea:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.admin-form-textarea {
  resize: vertical;
  min-height: 90px;
}

/* ==========================================================================
   EarnifyX Lab - Spotlight Command Palette Search Modal
   ========================================================================== */

.spotlight-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem 1rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spotlight-modal-container {
  width: 100%;
  max-width: 720px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: translateY(-20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 82vh;
}

.spotlight-modal-overlay.active .spotlight-modal-container {
  transform: translateY(0) scale(1);
}

/* Spotlight Header */
.spotlight-header {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  gap: 0.85rem;
}

.spotlight-search-icon {
  font-size: 1.25rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotlight-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  padding: 0.25rem 0;
  font-family: inherit;
}

.spotlight-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.spotlight-clear-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spotlight-clear-btn.visible {
  display: inline-flex;
}

.spotlight-clear-btn:hover {
  background: var(--accent-danger);
  color: #ffffff;
  border-color: var(--accent-danger);
}

.spotlight-close-btn {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.15s ease;
}

.spotlight-close-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

/* Category Filter Tabs */
.spotlight-categories {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.spotlight-categories::-webkit-scrollbar {
  display: none;
}

.spotlight-cat-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.spotlight-cat-btn:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.spotlight-cat-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Spotlight Body */
.spotlight-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  max-height: calc(82vh - 175px);
  min-height: 220px;
}

/* Section Titles inside Spotlight */
.spotlight-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0.85rem 0 0.5rem;
  padding: 0 0.25rem;
}

.spotlight-section-title:first-child {
  margin-top: 0;
}

.spotlight-clear-history-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.spotlight-clear-history-btn:hover {
  text-decoration: underline;
}

/* Tag / Chip Pills */
.spotlight-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.spotlight-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.spotlight-tag-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: var(--accent-primary-light);
  transform: translateY(-1px);
}

/* Quick Navigation Grid */
.spotlight-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.spotlight-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.85rem 0.5rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.spotlight-nav-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.spotlight-nav-icon {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.spotlight-nav-name {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Search Result List */
.spotlight-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.spotlight-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background-color: var(--bg-surface);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  color: inherit;
}

.spotlight-result-item:hover,
.spotlight-result-item.focused {
  background-color: var(--bg-surface-subtle);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  transform: translateX(3px);
}

.spotlight-result-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.spotlight-result-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
}

.spotlight-result-info {
  flex: 1;
  min-width: 0;
}

.spotlight-result-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.spotlight-result-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-title mark {
  background-color: rgba(251, 191, 36, 0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.spotlight-result-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0.75rem;
  flex-shrink: 0;
}

.spotlight-action-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.spotlight-result-item:hover .spotlight-action-pill,
.spotlight-result-item.focused .spotlight-action-pill {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Empty State */
.spotlight-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.spotlight-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.spotlight-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.spotlight-empty-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Footer */
.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spotlight-shortcuts-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spotlight-shortcuts-hint kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-primary);
}

.spotlight-advanced-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.spotlight-advanced-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .spotlight-modal-overlay {
    padding: 1rem;
    align-items: flex-start;
  }
  .spotlight-modal-container {
    max-height: 90vh;
  }
  .spotlight-shortcuts-hint {
    display: none;
  }
  .spotlight-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Captcha Security Component Styles
   ========================================================================== */
.captcha-component {
  margin-bottom: 1.25rem;
  padding: 0.9rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.captcha-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.captcha-hint {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.captcha-box-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.captcha-canvas-wrap {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px dashed var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.captcha-canvas {
  width: 100%;
  height: 44px;
  display: block;
  user-select: none;
  pointer-events: none;
}

.captcha-refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.captcha-refresh-btn:hover {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border-color: var(--border-focus);
  transform: scale(1.04);
}

.captcha-refresh-btn:active {
  transform: scale(0.96);
}

.captcha-refresh-btn.spinning .captcha-refresh-icon {
  animation: spinRefresh 0.5s ease-in-out;
}

@keyframes spinRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.captcha-input-wrap {
  width: 100%;
}

.captcha-input {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.captcha-input::placeholder {
  letter-spacing: normal;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--text-muted);
}

.captcha-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.captcha-input.captcha-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
  animation: captchaShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.captcha-input.captcha-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18) !important;
}

@keyframes captchaShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* ==========================================================================
   Author Attribution & Role Badges (Admin vs Manager)
   ========================================================================== */
.card-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  width: fit-content;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease;
}

.card-author-badge:hover {
  transform: translateY(-1px);
}

.card-author-badge.manager-author {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.28);
}

[data-theme="dark"] .card-author-badge.manager-author {
  background: rgba(129, 140, 248, 0.16);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}

.card-author-badge.admin-author {
  background: rgba(37, 99, 235, 0.09);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.22);
}

[data-theme="dark"] .card-author-badge.admin-author {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.3);
}

.admin-role-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.admin-role-indicator.role-admin {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.admin-role-indicator.role-manager {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

[data-theme="dark"] .admin-role-indicator.role-admin {
  background: rgba(30, 64, 175, 0.25);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .admin-role-indicator.role-manager {
  background: rgba(109, 40, 217, 0.25);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.4);
}





/* ==========================================================================
   Legal pages (Privacy Policy, Terms, Disclaimer)
   ========================================================================== */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  width: 100%;
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.75;
}

.legal-eyebrow {
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.legal-card h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.legal-card h2 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 2rem 0 0.6rem;
}

.legal-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 1.25rem 0 0.4rem;
}

.legal-card p {
  margin-bottom: 0.9rem;
}

.legal-card ul {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-card a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-card a.btn {
  text-decoration: none;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Admin header: no public nav, so keep the right controls from crowding the brand */
.admin-header-spacer {
  flex: 1;
  min-width: 0.5rem;
}

.admin-page .header-right {
  flex-shrink: 0;
}

.admin-page .brand-logo {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .admin-page #adminUserRoleBadge .admin-role-indicator span:nth-child(3) {
    display: none;
  }
}

@media (max-width: 640px) {
  .admin-page #adminUserRoleBadge {
    display: none;
  }
}
