/* XActions Common Styles — shared across all dashboard pages */
/* by nichxbt */

:root {
  --bg-primary: #000000;
  --bg-secondary: #16181c;
  --bg-tertiary: #202327;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --accent-light: rgba(29, 155, 240, 0.1);
  --text-primary: #e7e9ea;
  --text-secondary: #71767b;
  --border: #2f3336;
  --success: #00ba7c;
  --error: #f4212e;
  --warning: #ffad1f;
  --purple: #a855f7;

  /* ---- Glow-up layer: gradients, glow, depth (X-clone identity kept) ---- */
  --accent-2: #22d3ee;                 /* cyan companion to the X blue */
  --accent-3: #4f8cff;
  --grad: linear-gradient(135deg, #1d9bf0 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(29,155,240,0.18), rgba(34,211,238,0.10));
  --grad-text: linear-gradient(120deg, #6fc3ff 0%, #57e6f2 100%);
  --border-glow: rgba(29, 155, 240, 0.4);
  --glow-accent: 0 0 0 1px rgba(29,155,240,0.28), 0 10px 40px -10px rgba(29,155,240,0.45);
  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 10px 34px -12px rgba(0,0,0,0.6);
  --shadow-3: 0 26px 70px -24px rgba(0,0,0,0.75);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ring: 0 0 0 3px rgba(29,155,240,0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 16px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 8px; border: 4px solid var(--bg-primary); }

/* Layout */
.layout {
  display: flex;
  max-width: 1300px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar-left {
  width: 275px;
  padding: 0 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.logo { padding: 8px 12px; margin-bottom: 4px; }
.logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.8rem;
  padding: 12px;
  border-radius: 9999px;
  transition: background 0.2s;
  line-height: 1;
}
.logo a:hover { background: var(--accent-light); }

nav { flex: 1; overflow-y: auto; }
nav::-webkit-scrollbar { width: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px;
  border-radius: 9999px;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s;
  margin-bottom: 4px;
}
.nav-item:hover { background: var(--bg-tertiary); }
.nav-item.active { font-weight: 700; }
.nav-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon svg { width: 26px; height: 26px; }
.nav-item.active .nav-icon svg { stroke-width: 2.5; }

.action-btn {
  width: 90%;
  padding: 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 9999px;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin: 16px 0;
  text-decoration: none;
  display: block;
  text-align: center;
}
.action-btn:hover { background: var(--accent-hover); }

/* Main Content */
.main-content {
  flex: 1;
  max-width: 600px;
  border-right: 1px solid var(--border);
}

.main-header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  z-index: 100;
}
.main-header h1 { font-size: 1.25rem; font-weight: 700; }

/* Right Sidebar */
.sidebar-right {
  width: 350px;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  background: var(--bg-primary);
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-section h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.footer-section p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.5; margin-bottom: 8px; }
.footer-section a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; padding: 4px 0; transition: color 0.2s; }
.footer-section a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { color: var(--text-secondary); font-size: 0.8125rem; }
.footer-bottom a { color: var(--text-secondary); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

/* Skip Navigation (Accessibility) */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
}
.skip-nav:focus {
  top: 16px;
}

/* Visible focus styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar-right { display: none; }
  .main-content { max-width: 100%; }
}

@media (max-width: 768px) {
  .sidebar-left { width: 68px; padding: 0 4px; }
  .nav-item span:last-child, .user-info, .user-menu-dots { display: none; }
  .logo a { padding: 8px; }
  .nav-item { justify-content: center; padding: 12px; }
  .action-btn { width: 50px; height: 50px; padding: 0; font-size: 0; }
  .action-btn::before { content: '⚡'; font-size: 1.5rem; }
  .user-menu { justify-content: center; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-content { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* GLOW-UP LAYER  — depth, gradient, motion on top of the X-clone base         */
/* Enhances visuals only; layout structure and class names are unchanged.      */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Ambient depth: faint accent glows fixed behind everything */
body { position: relative; }
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1000px 560px at 82% -6%, rgba(29,155,240,0.10), transparent 60%),
    radial-gradient(760px 520px at 6% 4%, rgba(34,211,238,0.05), transparent 55%);
}

::selection { background: rgba(29,155,240,0.30); color: #fff; }

/* Smoother, glowier scrollbar */
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 8px; border: 4px solid var(--bg-primary); transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: #33404b; }

/* Sidebar structure: soften the hard borders with a hairline + subtle glass */
.sidebar-left { border-right: 1px solid var(--border); backdrop-filter: blur(6px); }
.main-content { border-right: 1px solid var(--border); }

/* Logo: gradient bolt lockup */
.logo a { gap: 10px; font-weight: 800; letter-spacing: -0.02em; }

/* Nav items: gradient pill on hover/active + slide */
.nav-item {
  position: relative;
  transition: background 0.22s var(--ease), color 0.2s, transform 0.16s var(--ease);
}
.nav-item:hover { background: var(--bg-tertiary); transform: translateX(2px); }
.nav-item.active {
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px var(--border-glow);
}
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px rgba(29,155,240,0.5)); }

/* Primary sidebar action button: gradient + glow + lift */
.action-btn {
  background: var(--grad);
  box-shadow: 0 8px 24px -8px rgba(29,155,240,0.65);
  transition: transform 0.16s var(--ease), box-shadow 0.25s var(--ease), filter 0.2s;
}
.action-btn:hover { background: var(--grad); filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(29,155,240,0.75); }
.action-btn:active { transform: translateY(0); }

/* Sticky header: richer glass */
.main-header { background: rgba(0,0,0,0.55); backdrop-filter: saturate(160%) blur(14px); }

/* Focus ring upgrade */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---- Footer: fix misalignment + glow ----
   The old layout let heading text sit inline with the first link on some
   pages. Force each column to a vertical block with the heading on its own
   row, and give the footer a top accent hairline. */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}
.footer-content > div { display: flex; flex-direction: column; align-items: flex-start; }
.footer-content h3, .footer-content h4 { width: 100%; }
.footer-brand h3 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.footer-links h4, .footer-section h4 {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); font-weight: 700; margin-bottom: 12px;
}
.footer-links a, .footer-section a { transition: color 0.18s, transform 0.18s var(--ease); }
.footer-links a:hover, .footer-section a:hover { color: var(--accent); transform: translateX(2px); }

/* ---- Motion: gentle entrance for content on load ---- */
@media (prefers-reduced-motion: no-preference) {
  .main-content > section, .card, .stat-card, .promo-card {
    animation: xaRise 0.5s var(--ease) both;
  }
}
@keyframes xaRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Utility: gradient text + glow chip, available site-wide */
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* Mobile: give the collapsed icon rail a touch more breathing room */
@media (max-width: 768px) {
  .sidebar-left { width: 72px; }
  .nav-item { transform: none; }
  .nav-item:hover { transform: none; }
}
