/*
Theme Name: NXN AI Dashboard
Theme URI: https://nxn.ai
Author: NXN Team
Author URI: https://nxn.ai
Description: A modern AI dashboard theme for NXN - One AI Agent for Your Life and Business. Fully compatible with Elementor and other page builders.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nxn-theme
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-width-template, theme-options, translation-ready

NXN AI Dashboard Theme - Built for Elementor compatibility
*/

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
  /* Light Mode Colors */
  --nxn-background: #ffffff;
  --nxn-foreground: #0a0a0a;
  --nxn-card: #ffffff;
  --nxn-card-foreground: #0a0a0a;
  --nxn-primary: #8b5cf6;
  --nxn-primary-foreground: #ffffff;
  --nxn-secondary: #f5f5f5;
  --nxn-secondary-foreground: #525252;
  --nxn-muted: #f5f5f5;
  --nxn-muted-foreground: #737373;
  --nxn-accent: #f5f5f5;
  --nxn-accent-foreground: #171717;
  --nxn-border: #e5e5e5;
  --nxn-ring: #8b5cf6;
  
  /* Spacing */
  --nxn-radius: 0.5rem;
  --nxn-radius-lg: 1rem;
  --nxn-radius-xl: 1.5rem;
  
  /* Typography */
  --nxn-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nxn-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Dark Mode */
.dark,
[data-theme="dark"] {
  --nxn-background: #0a0a0a;
  --nxn-foreground: #fafafa;
  --nxn-card: #171717;
  --nxn-card-foreground: #fafafa;
  --nxn-primary: #8b5cf6;
  --nxn-primary-foreground: #ffffff;
  --nxn-secondary: #262626;
  --nxn-secondary-foreground: #a3a3a3;
  --nxn-muted: #262626;
  --nxn-muted-foreground: #a3a3a3;
  --nxn-accent: #262626;
  --nxn-accent-foreground: #fafafa;
  --nxn-border: #262626;
  --nxn-ring: #8b5cf6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--nxn-font-sans);
  background-color: var(--nxn-background);
  color: var(--nxn-foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Theme Transitions */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color, fill, stroke, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: ease-in-out;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--nxn-foreground);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--nxn-muted-foreground);
  line-height: 1.7;
}

a {
  color: var(--nxn-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--nxn-foreground);
}

/* ========================================
   Layout Components
   ======================================== */
.nxn-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nxn-section {
  padding: 4rem 0;
}

/* ========================================
   Card Components (Elementor Ready)
   ======================================== */
.nxn-card {
  background-color: var(--nxn-card);
  border: 1px solid var(--nxn-border);
  border-radius: var(--nxn-radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.nxn-card:hover {
  border-color: var(--nxn-primary);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.nxn-card-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
  border-radius: var(--nxn-radius-lg);
}

.dark .nxn-card-glass {
  background: rgba(23, 23, 23, 0.8);
}

/* ========================================
   Hero Section
   ======================================== */
.nxn-hero {
  position: relative;
  padding: 3rem 1.5rem;
  border-radius: var(--nxn-radius-xl);
  background: linear-gradient(to bottom right, var(--nxn-card), var(--nxn-card), rgba(245, 245, 245, 0.3));
  border: 1px solid var(--nxn-border);
  overflow: hidden;
  max-width: 64rem;
  margin: 0 auto;
}

.dark .nxn-hero {
  background: linear-gradient(to bottom right, var(--nxn-card), var(--nxn-card), rgba(38, 38, 38, 0.3));
}

.nxn-hero-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.nxn-hero-subtitle {
  font-size: 1.125rem;
  color: var(--nxn-muted-foreground);
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

/* ========================================
   Feature Cards
   ======================================== */
.nxn-feature-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .nxn-feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nxn-feature-card {
  padding: 1.25rem;
  border-radius: var(--nxn-radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
}

.dark .nxn-feature-card {
  background: rgba(23, 23, 23, 0.8);
}

.nxn-feature-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nxn-feature-icon {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--nxn-secondary);
}

.nxn-feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--nxn-muted-foreground);
}

.nxn-feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--nxn-foreground);
}

.nxn-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nxn-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--nxn-muted-foreground);
  padding: 0.375rem 0;
}

.nxn-feature-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--nxn-primary);
}

/* ========================================
   Dashboard Section
   ======================================== */
.nxn-dashboard-container {
  position: relative;
  padding: 2rem 1.5rem;
  border-radius: var(--nxn-radius-xl);
  background: linear-gradient(to bottom right, var(--nxn-card), var(--nxn-card), rgba(245, 245, 245, 0.3));
  border: 1px solid var(--nxn-border);
  overflow: hidden;
  max-width: 64rem;
  margin: 0 auto;
}

.dark .nxn-dashboard-container {
  background: linear-gradient(to bottom right, var(--nxn-card), var(--nxn-card), rgba(38, 38, 38, 0.3));
}

/* Stats Bar */
.nxn-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .nxn-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nxn-stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
}

.dark .nxn-stat-card {
  background: rgba(23, 23, 23, 0.8);
}

.nxn-stat-icon {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--nxn-primary);
}

.nxn-stat-label {
  font-size: 0.625rem;
  font-family: var(--nxn-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nxn-muted-foreground);
}

.nxn-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nxn-foreground);
}

/* Main Dashboard Grid */
.nxn-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .nxn-dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* AI Control Center */
.nxn-ai-control {
  padding: 1.5rem;
  border-radius: var(--nxn-radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
}

.dark .nxn-ai-control {
  background: rgba(23, 23, 23, 0.8);
}

.nxn-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.nxn-ai-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nxn-ai-icon {
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: rgba(139, 92, 246, 0.1);
}

.nxn-ai-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--nxn-primary);
}

.nxn-ai-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nxn-foreground);
}

.nxn-ai-version {
  font-size: 0.75rem;
  font-family: var(--nxn-font-mono);
  color: var(--nxn-muted-foreground);
}

.nxn-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nxn-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nxn-status-text {
  font-size: 0.75rem;
  font-family: var(--nxn-font-mono);
  color: #22c55e;
}

/* Status Panel */
.nxn-status-panel {
  padding: 1.25rem;
  border-radius: var(--nxn-radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
}

.dark .nxn-status-panel {
  background: rgba(23, 23, 23, 0.8);
}

.nxn-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.nxn-status-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nxn-foreground);
}

.nxn-status-time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-family: var(--nxn-font-mono);
  color: var(--nxn-muted-foreground);
}

.nxn-status-time::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: #22c55e;
}

.nxn-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nxn-progress-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nxn-progress-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--nxn-secondary);
}

.nxn-progress-info {
  flex: 1;
}

.nxn-progress-label {
  font-size: 0.75rem;
  color: var(--nxn-foreground);
  margin-bottom: 0.25rem;
}

.nxn-progress-bar {
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--nxn-secondary);
  overflow: hidden;
}

.nxn-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.nxn-progress-fill.green { background-color: #22c55e; }
.nxn-progress-fill.yellow { background-color: #eab308; }
.nxn-progress-fill.blue { background-color: #3b82f6; }

/* System Status Card (Navigator API - real client data) */
.nxn-sys-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nxn-sys-status-list .nxn-sys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.nxn-sys-status-list .nxn-status-icon {
  flex-shrink: 0;
}
.nxn-sys-status-list .nxn-status-name {
  flex: 1;
}
.nxn-status-bar-wrap {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}
.nxn-status-bar-wrap .nxn-status-bar {
  height: 6px;
  background: var(--nxn-secondary);
  border-radius: 6px;
  overflow: hidden;
}
.nxn-status-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.6s ease;
  border-radius: 6px;
}
.nxn-fill-green { background: #22c55e; }
.nxn-fill-yellow { background: #f59e0b; }

.nxn-progress-value {
  font-size: 0.75rem;
  font-family: var(--nxn-font-mono);
  color: var(--nxn-muted-foreground);
  white-space: nowrap;
}

/* Alerts Panel */
.nxn-alerts-panel {
  padding: 1.25rem;
  border-radius: var(--nxn-radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
}

.dark .nxn-alerts-panel {
  background: rgba(23, 23, 23, 0.8);
}

.nxn-alerts-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nxn-alerts-icon {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--nxn-secondary);
}

.nxn-alerts-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nxn-foreground);
}

.nxn-alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nxn-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.nxn-alert-item svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.nxn-alert-item svg.cyan { color: #06b6d4; }
.nxn-alert-item svg.green { color: #10b981; }
.nxn-alert-item svg.yellow { color: #eab308; }

.nxn-alert-text {
  font-size: 0.875rem;
  line-height: 1.5;
}

.nxn-alert-message {
  font-weight: 500;
  color: var(--nxn-foreground);
}

.nxn-alert-detail {
  color: var(--nxn-muted-foreground);
}

/* Quick Actions */
.nxn-actions-panel {
  padding: 1.25rem;
  border-radius: var(--nxn-radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--nxn-border);
}

.dark .nxn-actions-panel {
  background: rgba(23, 23, 23, 0.8);
}

.nxn-actions-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nxn-foreground);
  margin-bottom: 1rem;
}

.nxn-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.nxn-action-btn {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background-color: var(--nxn-secondary);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nxn-muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nxn-action-btn:hover {
  color: var(--nxn-foreground);
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.5);
}

/* ========================================
   Buttons
   ======================================== */
.nxn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nxn-btn-primary {
  background-color: var(--nxn-primary);
  color: var(--nxn-primary-foreground);
}

.nxn-btn-primary:hover {
  background-color: #7c3aed;
}

.nxn-btn-outline {
  background-color: transparent;
  border-color: var(--nxn-border);
  color: var(--nxn-foreground);
}

.nxn-btn-outline:hover {
  background-color: var(--nxn-card);
  border-color: var(--nxn-muted-foreground);
}

/* ========================================
   Header & Navigation
   ======================================== */
.nxn-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nxn-border);
}

.dark .nxn-header {
  background: rgba(10, 10, 10, 0.8);
}

.nxn-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nxn-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nxn-foreground);
}

.nxn-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nxn-nav-link {
  font-size: 0.875rem;
  color: var(--nxn-muted-foreground);
  transition: color 0.2s ease;
}

.nxn-nav-link:hover {
  color: var(--nxn-foreground);
}

/* Theme Toggle */
.nxn-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 9999px;
  background-color: var(--nxn-secondary);
  border: 1px solid var(--nxn-border);
}

.nxn-theme-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--nxn-muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nxn-theme-btn.active {
  background-color: var(--nxn-card);
  color: var(--nxn-foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nxn-theme-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ========================================
   Dashboard Preview Cards
   ======================================== */
.nxn-preview-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nxn-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .nxn-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nxn-preview-card {
  position: relative;
  border-radius: var(--nxn-radius-lg);
  background-color: var(--nxn-card);
  border: 1px solid var(--nxn-border);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nxn-preview-card:hover {
  border-color: var(--nxn-primary);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.nxn-preview-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.nxn-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.nxn-preview-card:hover .nxn-preview-image img {
  transform: scale(1.05);
}

.nxn-preview-status {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.dark .nxn-preview-status {
  background: rgba(10, 10, 10, 0.8);
}

.nxn-preview-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.nxn-preview-status-dot.active { background-color: #22c55e; }
.nxn-preview-status-dot.warning { background-color: #eab308; }
.nxn-preview-status-dot.idle { background-color: var(--nxn-muted-foreground); }

.nxn-preview-status-text {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nxn-foreground);
}

.nxn-preview-info {
  padding: 1rem;
  border-top: 1px solid var(--nxn-border);
}

.nxn-preview-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nxn-foreground);
  margin-bottom: 0.25rem;
}

.nxn-preview-desc {
  font-size: 0.75rem;
  color: var(--nxn-muted-foreground);
}

/* ========================================
   Footer
   ======================================== */
.nxn-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--nxn-border);
  margin-top: 4rem;
}

.nxn-footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.nxn-footer-text {
  font-size: 0.875rem;
  color: var(--nxn-muted-foreground);
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ========================================
   Responsive Utilities
   ======================================== */
@media (max-width: 767px) {
  .nxn-hero-title {
    font-size: 2rem;
  }
  
  .nxn-nav {
    display: none;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* ========================================
   Elementor Compatibility
   ======================================== */
.elementor-section.nxn-section {
  padding: 4rem 0;
}

.elementor-widget-container .nxn-card,
.elementor-widget-container .nxn-feature-card,
.elementor-widget-container .nxn-stat-card {
  height: 100%;
}

/* Ensure proper styling inside Elementor columns */
.elementor-column .nxn-card {
  margin-bottom: 0;
}
