/* ============================================================
   Linker360 — Premium AI-Upgraded Design System v2.0
   ============================================================ */

/* --- CSS Variables / Tokens --- */
:root {
  --brand-500: #EE2B47;
  --brand-600: #F95738;
  --brand-700: #FF9F1C;
  --accent-400: #F95738;
  --accent-500: #FF9F1C;
  --ink-50: #F8F9FB;
  --ink-100: #F1F3F7;
  --ink-200: #E5E8ED;
  --ink-300: #CBD0DA;
  --ink-400: #9098A8;
  --ink-500: #5B6473;
  --ink-700: #293142;
  --ink-900: #0F1626;
  --ink-950: #070A14;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-brand: 0 8px 32px rgba(235, 32, 38, 0.18);
  --shadow-card: 0 2px 16px rgba(15, 22, 38, 0.08);
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --glass-bg: rgba(15, 22, 38, 0.88);
  --glass-border: rgba(255, 255, 255, 0.1);
  --ink-50: #111827;
  --ink-100: #1f2937;
  --ink-200: #374151;
  --ink-300: #4b5563;
  --ink-400: #6b7280;
  --ink-500: #9ca3af;
  --ink-700: #d1d5db;
  --ink-900: #f3f4f6;
}

html,
body {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

[data-theme="dark"] body {
  background: #0d1117;
  color: #e5e7eb;
}

/* ========== SCROLL PROGRESS ========== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400), var(--brand-500));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ========== DEALS STRIP ========== */
.deals-strip {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, #EB2026, #FBBF24, #ff6b35, #EB2026);
  background-size: 300% 100%;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  0% {
    background-position: 0% 50%
  }

  100% {
    background-position: 300% 50%
  }
}

.ribbon-marquee {
  display: flex;
  gap: 2.5rem;
  animation: marquee 38s linear infinite;
  width: max-content;
  white-space: nowrap;
}

.ribbon-item {
  display: inline-block;
  padding: 0 .5rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

/* ========== LOGO ========== */
.logo-breathe {
  animation: breathe 3.5s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.06)
  }
}

/* ========== CARDS ========== */
.card-tactile {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
  display: block;
}

.card-tactile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 24px 48px rgba(235, 32, 38, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .card-tactile {
  background: #1a1f2e;
  border-color: #2d3748;
}

/* AI Score Ring */
.ai-score-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--brand-500) var(--score, 0%), var(--ink-100) 0%);
  display: grid;
  place-items: center;
  font-size: .65rem;
  font-weight: 800;
  color: var(--brand-500);
  position: relative;
}

.ai-score-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.ai-score-ring span {
  position: relative;
  z-index: 1;
}

/* ========== BUTTONS ========== */
.btn-brand {
  background: var(--brand-500);
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border: none;
  cursor: pointer;
}

.btn-brand:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}

.btn-brand:active {
  transform: scale(.97);
}

.btn-accent {
  background: var(--accent-400);
  color: #0F1626;
  font-weight: 600;
  border-radius: 9999px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  background: var(--accent-500);
  transform: translateY(-1px);
}

.btn-outline-brand {
  background: transparent;
  border: 2px solid var(--brand-500);
  color: var(--brand-500);
  font-weight: 600;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  transition: var(--transition);
}

.btn-outline-brand:hover {
  background: var(--brand-500);
  color: #fff;
}

/* ========== HERO OVERLAY ========== */
.hero-overlay {
  background: linear-gradient(135deg, rgba(235, 32, 38, .55) 0%, rgba(15, 22, 38, .68) 100%);
}

/* ========== GLASS WIDGET ========== */
.glass-widget {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 16px 48px rgba(235, 32, 38, 0.15), 0 4px 16px rgba(0, 0, 0, .05);
}

/* ========== INPUTS ========== */
.input-soft {
  height: 3rem;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: .75rem;
  padding: 0 1rem;
  color: var(--ink-900);
  width: 100%;
  transition: var(--transition);
  font-family: inherit;
  font-size: .95rem;
}

.input-soft:focus {
  outline: none;
  border-color: #FF98A0;
  box-shadow: 0 0 0 3px rgba(235, 32, 38, .12);
}

.input-soft::placeholder {
  color: var(--ink-400);
}

[data-theme="dark"] .input-soft {
  background: #1a1f2e;
  border-color: #374151;
  color: #e5e7eb;
}

/* ========== MARQUEE ROW ========== */
.marquee-row {
  display: flex;
  gap: 1rem;
  animation: marquee 38s linear infinite;
  width: max-content;
}

/* ========== TAB PILL ========== */
.tab-pill-active {
  background: var(--brand-500) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(235, 32, 38, .3);
}

/* ========== STAGGER / FADE-UP ========== */
.stagger>* {
  opacity: 0;
  animation: fade-up .55s ease-out forwards;
}

.stagger>*:nth-child(1) {
  animation-delay: .04s
}

.stagger>*:nth-child(2) {
  animation-delay: .09s
}

.stagger>*:nth-child(3) {
  animation-delay: .14s
}

.stagger>*:nth-child(4) {
  animation-delay: .19s
}

.stagger>*:nth-child(5) {
  animation-delay: .24s
}

.stagger>*:nth-child(6) {
  animation-delay: .29s
}

.stagger>*:nth-child(7) {
  animation-delay: .34s
}

.stagger>*:nth-child(8) {
  animation-delay: .39s
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(24px)
  }

  100% {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ========== HERO PARTICLES ========== */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ========== TYPEWRITER ========== */
.typewriter-cursor {
  border-right: 3px solid var(--accent-400);
  animation: blink .7s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

/* ========== ONLINE CHIP ========== */
.online-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-green 1.5s ease-in-out infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .5)
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0)
  }
}

/* ========== AI BUDGET ESTIMATOR ========== */
.ai-estimator {
  background: linear-gradient(135deg, #1f0205, #4a050d);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(235, 32, 38, 0.2);
}

.ai-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand-500), var(--accent-400), #e11d48, var(--brand-500));
  animation: spin-slow 4s linear infinite;
  display: grid;
  place-items: center;
}

.ai-orb::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #1f0205;
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-500) var(--pct, 50%), var(--ink-200) 0%);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-500);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(235, 32, 38, .2);
  transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 8px rgba(235, 32, 38, .2);
}

/* ========== TRENDING CAROUSEL ========== */
.trending-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.trending-scroll::-webkit-scrollbar {
  display: none;
}

.trending-scroll>* {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ========== PAYWALL ========== */
.blur-paywall {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ink-100);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-500);
  border-radius: 4px;
}

/* ========== STATUS PILLS ========== */
.status {
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: inline-block;
}

.status-pending {
  background: #FEF3C7;
  color: #92400E
}

.status-confirmed {
  background: #DCFCE7;
  color: #166534
}

.status-cancelled {
  background: #FEE2E2;
  color: #991B1B
}

.status-completed {
  background: #DBEAFE;
  color: #1E40AF
}

.status-active {
  background: #DCFCE7;
  color: #166534
}

.status-suspended {
  background: #FEE2E2;
  color: #991B1B
}

/* ========== DASHBOARD TABS ========== */
.dash-tab {
  padding: .5rem 1rem;
  border-radius: .75rem;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--ink-500);
  border: none;
  background: none;
  white-space: nowrap;
}

.dash-tab.active {
  background: linear-gradient(135deg, #EE2B47 0%, #F95738 50%, #FF9F1C 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(249, 87, 56, 0.25);
  border: none;
}

.dash-tab:hover:not(.active) {
  background: var(--ink-100);
  color: var(--ink-700);
}

.tab-panel {
  display: none;
  animation: fade-up .35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.active {
  display: block;
}

/* ========== PREMIUM RED-SAFFRON UPGRADED DASHBOARD SIDEBAR ========== */
.dash-aside {
  background: #ffffff;
  border: 1px solid rgba(249, 87, 56, 0.1);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  color: var(--ink-900);
  box-shadow: 0 20px 40px -10px rgba(249, 87, 56, 0.04), 0 1px 3px rgba(15, 22, 38, 0.01);
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-aside:hover {
  box-shadow: 0 30px 60px -15px rgba(249, 87, 56, 0.08), 0 1px 4px rgba(15, 22, 38, 0.02);
  border-color: rgba(249, 87, 56, 0.2);
}

.dash-aside-header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px dashed rgba(249, 87, 56, 0.15);
}

.aside-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-400);
  margin-top: 1.75rem;
  margin-bottom: 0.85rem;
  padding-left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-aside nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  color: var(--ink-500);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 0.4rem;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.dash-aside nav a i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-400);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-aside nav a span.link-text {
  flex-grow: 1;
  text-align: left;
  z-index: 1;
}

.dash-aside nav a:hover {
  background: rgba(249, 87, 56, 0.05);
  color: #EE2B47;
  border-color: rgba(249, 87, 56, 0.15);
  transform: translateX(4px);
}

.dash-aside nav a:hover i {
  color: #F95738;
  transform: scale(1.18);
}

.dash-aside nav a.active {
  background: linear-gradient(135deg, #EE2B47 0%, #F95738 50%, #FF9F1C 100%);
  color: #ffffff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(249, 87, 56, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dash-aside nav a.active i {
  color: #ffffff;
}

/* Elegant & Clean Badges */
.nav-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  display: inline-block;
  line-height: 1.2;
}

.nav-badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.nav-badge-green {
  background: #dcfce7;
  color: #15803d;
}

.nav-badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.nav-badge-gold {
  background: #fef3c7;
  color: #b45309;
}


/* ========== RED SAFFRON STAT CARDS (Dashboard) ========== */
.stat-card {
  background: #ffffff;
  border-radius: var(--radius-2xl);
  padding: 1.8rem 1.6rem;
  border: 1px solid rgba(249, 87, 56, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px -15px rgba(249, 87, 56, 0.05), 0 1px 3px rgba(15, 22, 38, 0.01);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -15px rgba(249, 87, 56, 0.15), 0 2px 8px rgba(15, 22, 38, 0.02);
  border-color: rgba(249, 87, 56, 0.3);
}

.stat-card:hover::before {
  transform: scale(1.3);
  opacity: 0.28;
}

.stat-card.brand::before {
  background: linear-gradient(135deg, #EE2B47, #F95738);
}

.stat-card.gold::before {
  background: linear-gradient(135deg, #FF9F1C, #F95738);
}

.stat-card.emerald::before {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-card .stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card .trend-up {
  color: #10b981;
  font-size: .75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.08);
  padding: 3px 9px;
  border-radius: 8px;
}

.stat-card .trend-dn {
  color: #ef4444;
  font-size: .75rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.08);
  padding: 3px 9px;
  border-radius: 8px;
}

[data-theme="dark"] .stat-card {
  background: rgba(26, 31, 46, 0.65);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ========== TAB PANELS SMOOTH FADE-IN ========== */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tabPaneFadeIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes tabPaneFadeIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========== ACTIVITY TIMELINE ========== */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  display: flex;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--ink-100);
  align-items: flex-start;
}

.timeline li:last-child {
  border: none;
}

.timeline .tl-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: .85rem;
}

/* ========== AI PLANNER CHAT ========== */
.ai-chat-msg {
  max-width: 75%;
  padding: .75rem 1rem;
  border-radius: 1rem;
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: .75rem;
}

.ai-chat-msg.bot {
  background: var(--ink-50);
  color: var(--ink-900);
  border-radius: 1rem 1rem 1rem 4px;
}

.ai-chat-msg.user {
  background: var(--brand-500);
  color: #fff;
  margin-left: auto;
  border-radius: 1rem 1rem 4px 1rem;
}

.ai-typing span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-400);
  margin: 0 2px;
  animation: typing-dot 1.2s ease-in-out infinite;
}

.ai-typing span:nth-child(2) {
  animation-delay: .2s
}

.ai-typing span:nth-child(3) {
  animation-delay: .4s
}

@keyframes typing-dot {

  0%,
  80%,
  100% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(-6px)
  }
}

/* ========== FLOATING AI CHAT BUTTON ========== */
#ai-chat-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 8px 32px rgba(235, 32, 38, .4);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#ai-chat-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 40px rgba(235, 32, 38, .5);
}

#ai-chat-btn .ripple {
  position: absolute;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  background: rgba(235, 32, 38, .3);
  animation: ripple-out 1.8s ease-out infinite;
}

@keyframes ripple-out {
  0% {
    transform: scale(1);
    opacity: .8
  }

  100% {
    transform: scale(2.2);
    opacity: 0
  }
}

/* ========== AI CHAT PANEL ========== */
#ai-chat-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 360px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
  overflow: hidden;
  transform: translateY(20px) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai-chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.chat-messages {
  height: 280px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.chat-input-row {
  display: flex;
  gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--ink-100);
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--ink-200);
  border-radius: .75rem;
  padding: .5rem .75rem;
  font-family: inherit;
  font-size: .875rem;
  outline: none;
}

.chat-input-row input:focus {
  border-color: var(--brand-500);
}

.chat-input-row button {
  background: var(--brand-500);
  color: #fff;
  border: none;
  border-radius: .75rem;
  padding: .5rem .85rem;
  cursor: pointer;
  transition: var(--transition);
}

.chat-input-row button:hover {
  background: var(--brand-600);
}

/* ========== DARK MODE TOGGLE ========== */
#dark-toggle {
  background: none;
  border: 1px solid var(--ink-200);
  border-radius: 9999px;
  padding: .35rem .75rem;
  cursor: pointer;
  font-size: .85rem;
  transition: var(--transition);
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: .35rem;
}

#dark-toggle:hover {
  background: var(--ink-100);
}

/* ========== BACK TO TOP ========== */
#back-top {
  position: fixed;
  bottom: 5.5rem;
  left: 1.5rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  display: grid;
  place-items: center;
}

#back-top.show {
  opacity: 1;
  pointer-events: all;
}

#back-top:hover {
  background: var(--brand-500);
  transform: translateY(-3px);
}

/* ========== ADMIN SIDEBAR (Modern) ========== */
.admin-side {
  background: linear-gradient(175deg, #0d1117 0%, #1a0a0f 60%, #0d1117 100%);
  color: #fff;
  padding: 1.5rem;
  width: 250px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(235, 32, 38, .15);
  transition: width .3s ease;
  z-index: 100;
}

.admin-side.collapsed {
  width: 72px;
}

.admin-side a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .9rem;
  border-radius: .75rem;
  color: rgba(255, 255, 255, .65);
  font-weight: 500;
  margin-bottom: .25rem;
  text-decoration: none;
  font-size: .875rem;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}

.admin-side a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.admin-side a.active {
  background: rgba(235, 32, 38, .2);
  color: #fff;
}

.admin-side a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand-500);
}

.admin-side a i {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.admin-side .side-label {
  transition: opacity .2s;
}

.admin-side.collapsed .side-label {
  opacity: 0;
  width: 0;
}

.admin-main {
  margin-left: 250px;
  padding: 2rem;
  min-height: 100vh;
  transition: margin .3s ease;
}

.admin-main.expanded {
  margin-left: 72px;
}

/* Admin Topbar */
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--ink-100);
  padding: .85rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  margin: -2rem -2rem 2rem -2rem;
}

[data-theme="dark"] .admin-topbar {
  background: #0d1117;
  border-color: #1f2937;
}

/* ========== KPI CARDS (Admin) ========== */
.kpi-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--ink-100);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: .875rem;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kpi-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.kpi-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-400);
  font-weight: 700;
  margin-top: .2rem;
}

.kpi-trend {
  font-size: .72rem;
  font-weight: 700;
  margin-top: .35rem;
}

.kpi-trend.up {
  color: #10b981;
}

.kpi-trend.dn {
  color: #ef4444;
}

[data-theme="dark"] .kpi-card {
  background: #1a1f2e;
  border-color: #2d3748;
}

/* ========== ACTIVITY FEED (Admin) ========== */
.activity-feed li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--ink-100);
}

.activity-feed li:last-child {
  border: none;
}

.act-icon {
  width: 34px;
  height: 34px;
  border-radius: .5rem;
  display: grid;
  place-items: center;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ========== CHART CONTAINER ========== */
.chart-wrap {
  position: relative;
  height: 240px;
}

/* ========== TABLES ========== */
.tbl {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.tbl th {
  background: var(--ink-50);
  padding: 12px 14px;
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-500);
  font-weight: 700;
  border-bottom: 1px solid var(--ink-100);
}

.tbl td {
  padding: 12px 14px;
  border-top: 1px solid var(--ink-100);
  font-size: .9rem;
  color: var(--ink-700);
}

.tbl tr:hover td {
  background: var(--ink-50);
}

.tbl a {
  color: var(--brand-500);
  font-weight: 600;
}

[data-theme="dark"] .tbl {
  background: #1a1f2e;
  border-color: #2d3748;
}

[data-theme="dark"] .tbl th {
  background: #111827;
}

[data-theme="dark"] .tbl td {
  color: #d1d5db;
  border-color: #2d3748;
}

/* ========== MOBILE ========== */
@media(max-width:760px) {
  .admin-side {
    position: static;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(235, 32, 38, .15);
  }

  .admin-main {
    margin-left: 0;
    padding: 1rem;
  }

  #ai-chat-panel {
    right: .5rem;
    bottom: 5rem;
    width: calc(100vw - 1rem);
  }
}

/* ========== RESPONSIVE DASHBOARD MOBILE SIDEBAR DRAWERS ========== */
@media (max-width: 1023px) {
  .dash-mobile-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--ink-200);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 950;
    box-shadow: 0 4px 12px rgba(15, 22, 38, 0.03);
  }

  [data-theme="dark"] .dash-mobile-bar {
    background: rgba(13, 17, 23, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .dash-aside {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh !important;
    width: 290px !important;
    max-width: 85vw;
    z-index: 1010 !important;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    border-radius: 0 24px 24px 0 !important;
    border-left: none !important;
    background: rgba(255, 255, 255, 0.98) !important;
    overflow-y: auto;
    margin: 0 !important;
  }

  [data-theme="dark"] .dash-aside {
    background: rgba(17, 24, 39, 0.98) !important;
  }

  .dash-aside.open {
    transform: translateX(0) !important;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15) !important;
  }

  .dash-aside-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 22, 38, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1005;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .dash-aside-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  body.aside-open {
    overflow: hidden !important;
  }
}

@media (min-width: 1024px) {
  .dash-mobile-bar {
    display: none !important;
  }

  .dash-aside-overlay {
    display: none !important;
  }
}

/* ============================================================
   PREMIUM CUSTOM DESIGN UPGRADES & LUXURY EFFECTS
   ============================================================ */

.glass-widget {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 50px rgba(15, 22, 38, 0.08), 0 4px 12px rgba(15, 22, 38, 0.03);
}

/* Dynamic glow button shadow effects */
.shadow-brand-glow {
  box-shadow: 0 10px 25px -5px rgba(235, 32, 38, 0.4), 0 8px 10px -6px rgba(235, 32, 38, 0.4);
}

/* Soft pulsating keyframes */
.animate-pulse-soft {
  animation: pulse-soft 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.02);
  }
}

/* High-Premium Card Hover glow effect */
.card-tactile {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(15, 22, 38, 0.05);
}

.card-tactile:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 60px rgba(235, 32, 38, 0.09), 0 10px 20px rgba(0, 0, 0, 0.04);
  border-color: rgba(235, 32, 38, 0.15);
}

/* Marquee slide row speed balance */
.marquee-row {
  display: flex;
  gap: 1.25rem;
  animation: marquee 45s linear infinite;
  width: max-content;
}

/* Loader spinning glow icon */
.fa-spin {
  animation: fa-spin 1.2s linear infinite;
}

/* Expandable drawer styling for search panel */
#advanced-filters-drawer {
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, margin-top 0.35s ease;
}

/* ============================================================
   Advertisement Banner Containers — Premium Styling
   ============================================================ */
.linker-ad-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1.5px solid rgba(229, 232, 237, 0.8);
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 22, 38, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.linker-ad-container:hover {
  box-shadow: 0 8px 32px rgba(15, 22, 38, 0.12);
  transform: translateY(-2px);
}

.linker-ad-container img {
  display: block;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.linker-ad-container:hover img {
  transform: scale(1.025);
}

/* Sponsored label badge inside ad */
.linker-ad-container .ad-sponsored-label {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(7, 10, 20, 0.68);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  pointer-events: none;
  z-index: 5;
}

/* Leaderboard & wide banner centering */
.linker-ad-container.ad-leaderboard {
  max-width: 970px;
  margin-left: auto;
  margin-right: auto;
}

/* Mid-grid banner full-bleed */
.linker-ad-container.ad-mid-grid {
  border-radius: 1.25rem;
  max-width: 100%;
}

/* Sidebar square ad */
.linker-ad-container.ad-sidebar {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 1rem;
}

/* Shimmer loading placeholder for ads */
@keyframes ad-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.ad-placeholder {
  background: linear-gradient(90deg, #F1F3F7 25%, #E5E8ED 50%, #F1F3F7 75%);
  background-size: 800px 100%;
  animation: ad-shimmer 1.4s ease-in-out infinite;
  border-radius: 1.5rem;
  min-height: 90px;
}