@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(22, 28, 45, 0.7);
  --bg-card-hover: rgba(26, 33, 53, 0.9);
  --border-glow: rgba(0, 242, 254, 0.15);
  --border-glow-active: rgba(0, 242, 254, 0.4);
  
  --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --accent-glow: 0 0 20px rgba(0, 242, 254, 0.25);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-accent: #00f2fe;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-glow) transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Cosmic background effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 15% 20%, rgba(0, 242, 254, 0.06) 0%, transparent 45%),
              radial-gradient(circle at 85% 75%, rgba(130, 92, 255, 0.06) 0%, transparent 45%);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 75% 25%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
              radial-gradient(circle at 25% 80%, rgba(130, 92, 255, 0.04) 0%, transparent 40%);
  z-index: -2;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-accent);
}

/* Typography & Layouts */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  border-color: var(--border-glow-active);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), var(--accent-glow);
  transform: translateY(-2px);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover {
  box-shadow: var(--accent-glow);
  opacity: 0.95;
  transform: scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-accent);
}

.btn-success {
  background: var(--success-gradient);
  color: #fff;
}
.btn-success:hover {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  transform: scale(1.02);
}

.btn-danger {
  background: var(--danger-gradient);
  color: #fff;
}
.btn-danger:hover {
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Form Inputs */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s ease-in-out;
}
.form-input:focus {
  outline: none;
  border-color: var(--text-accent);
  box-shadow: var(--accent-glow);
  background: rgba(0, 0, 0, 0.4);
}

/* Login Wrapper */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

/* Main Dashboard UI */
.app-container {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  border-right: 1px solid var(--border-glow);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(20px);
}
.main-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  max-height: 100vh;
}

/* Navigation items */
.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--text-accent);
}

/* CRM Board layout */
.crm-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.crm-column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-glow);
  border-radius: 12px;
  padding: 20px;
  min-height: 400px;
}
.crm-card {
  padding: 16px;
  margin-bottom: 12px;
}

/* Support Ticket chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 400px;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin-top: 16px;
}
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}
.message-left {
  background: rgba(255, 255, 255, 0.05);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-glow);
}
.message-right {
  background: var(--primary-gradient);
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}
.chat-input-bar {
  display: flex;
  border-top: 1px solid var(--border-glow);
  background: rgba(0, 0, 0, 0.4);
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.chat-input:focus {
  outline: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Landing Page Styles */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 80px;
  background: rgba(9, 13, 22, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.landing-nav-links {
  display: flex;
  gap: 32px;
}

.landing-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.landing-nav-link:hover {
  color: var(--text-accent);
}

.landing-hero {
  padding: 120px 20px 80px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.landing-hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(to right, #ffffff, #888888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero h1 span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero p {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 40px;
}

.landing-section {
  padding: 80px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-section h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 16px;
}

.landing-section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 60px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-card {
  padding: 30px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  border-color: var(--text-accent);
  box-shadow: var(--accent-glow);
  transform: translateY(-5px);
}

.service-card-icon {
  font-size: 32px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-list-item {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-list-item::before {
  content: '✓';
  color: var(--text-accent);
  font-weight: bold;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.workflow-step {
  text-align: center;
  position: relative;
}

.workflow-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
  box-shadow: var(--accent-glow);
}

.workflow-step h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.workflow-step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.landing-footer {
  border-top: 1px solid var(--border-glow);
  padding: 60px 80px;
  background: rgba(9, 13, 22, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 80px auto 0;
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 20px;
  }
  .landing-nav-links {
    display: none;
  }
  .landing-hero h1 {
    font-size: 36px;
  }
  .landing-section {
    padding: 40px 20px;
  }
  .landing-footer {
    flex-direction: column;
    gap: 20px;
    padding: 40px 20px;
    text-align: center;
  }
}

/* 3D WebGL Background Canvas */
.hero-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: -1; /* Placed behind all content */
  pointer-events: none;
}

#canvas-3d {
  width: 100%;
  height: 100%;
  display: block;
}

.landing-hero {
  position: relative;
  z-index: 2; /* Ensure text is above 3D WebGL canvas */
}

/* Scroll-triggered reveal animations (Apple AirPods style) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  filter: blur(5px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Subtle staggered delay utility */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Custom Cursor (Trionn Inspired) */
.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-accent);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}

.custom-cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--text-accent);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

/* Hide default cursor on desktop for custom interactive feel */
@media (min-width: 769px) {
  body.has-custom-cursor {
    cursor: none;
  }
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor .btn,
  body.has-custom-cursor .service-card,
  body.has-custom-cursor .landing-nav-link {
    cursor: none;
  }
}

/* Decorative corner plus signs and grid frames */
.grid-frame-container {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.corner-plus {
  position: absolute;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
  pointer-events: none;
  font-family: monospace;
}
.corner-plus.tl { top: -9px; left: -6px; }
.corner-plus.tr { top: -9px; right: -6px; }
.corner-plus.bl { bottom: -11px; left: -6px; }
.corner-plus.br { bottom: -11px; right: -6px; }




