/**
 * Vellunox JARVIS Theme - Universal Styling
 * Apply this to any page for consistent futuristic look
 * FONTS: Poppins (headings) + Inter (body) - Clean & Readable
 */

/* Google Fonts - Standardized across entire site */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* CSS Variables */
:root {
  /* Typography - CONSISTENT ACROSS ALL PAGES */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  /* Colors */
  --jarvis-blue: #00d4ff;
  --jarvis-cyan: #00f5ff;
  --jarvis-gold: #ffd700;
  --jarvis-green: #00ff88;
  --jarvis-red: #ff3366;
  --jarvis-purple: #9945ff;
  --jarvis-orange: #ff9500;
  --bg-void: #000510;
  --bg-deep: #000a1a;
  --bg-surface: #001030;
  --bg-card: #00152a;
  --text-primary: #ffffff;
  --text-secondary: rgba(0, 212, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.85);
  --glow: rgba(0, 212, 255, 0.5);
  --border-glow: rgba(0, 212, 255, 0.3);
  --border-subtle: rgba(0, 212, 255, 0.15);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════════
   EMBLEM/LOGO FIX - Prevent Squishing
   ═══════════════════════════════════════════════════════════════════════ */
img[src*="vellunox-emblem"], 
img[src*="vellunox-logo"],
img[alt="Vellunox"],
img[alt="V"],
.logo img,
.auth-header img,
.nav img {
  object-fit: contain !important;
  aspect-ratio: 1 / 1;
  width: auto;
  height: auto;
  min-width: 40px;
  min-height: 40px;
  max-height: 60px;
}

/* Base Body - Improved Readability */
body.jarvis-theme {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ALL pages without jarvis-theme class also get good fonts */
body {
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
body.jarvis-theme::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 245, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 100, 200, 0.05) 0%, transparent 70%);
  z-index: -2;
  pointer-events: none;
}

/* Grid Pattern */
body.jarvis-theme::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
  pointer-events: none;
  animation: gridPulse 10s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════ */

/* Headings - Poppins for clean, modern look */
.jarvis-heading, 
.jarvis-theme h1, .jarvis-theme h2, .jarvis-theme h3, .jarvis-theme h4, .jarvis-theme h5, .jarvis-theme h6,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.jarvis-theme h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--jarvis-blue), var(--jarvis-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px var(--glow);
}

.jarvis-theme h2 {
  font-size: 1.5rem;
  color: var(--jarvis-blue);
}

.jarvis-theme h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.jarvis-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem; /* Increased from 0.7rem for better readability */
  letter-spacing: 2px; /* Reduced from 3px - easier to read */
  text-transform: uppercase;
  color: var(--jarvis-blue);
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY & READABILITY IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

/* Ensure body text is always readable */
.jarvis-theme p,
.jarvis-theme span:not(.jarvis-label),
.jarvis-theme td,
.jarvis-theme li,
.jarvis-theme label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* Info/data values should be clear */
.jarvis-theme .info-value,
.jarvis-theme .stat-value,
.jarvis-theme .data-value,
.jarvis-theme [class*="value"] {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

/* Form inputs should be very readable */
.jarvis-theme input,
.jarvis-theme textarea,
.jarvis-theme select {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0;
}

/* Secondary text - ensure readable contrast */
.jarvis-theme .text-secondary,
.jarvis-theme [class*="secondary"],
.jarvis-theme [class*="muted"] {
  color: rgba(255, 255, 255, 0.75) !important; /* Increased from 0.5/0.7 */
}

/* Small text minimum size */
.jarvis-theme small,
.jarvis-theme .text-sm,
.jarvis-theme .small {
  font-size: 0.8rem; /* Minimum 0.8rem for accessibility */
  line-height: 1.5;
}

/* Improved focus states for accessibility */
.jarvis-theme *:focus-visible {
  outline: 2px solid var(--jarvis-blue);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
  background: rgba(0, 5, 16, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.jarvis-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.jarvis-logo-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
}

.jarvis-logo-ring {
  position: absolute;
  inset: -3px;
  border: 2px solid var(--jarvis-blue);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--glow);
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 20px var(--glow); }
  50% { box-shadow: 0 0 35px var(--glow), 0 0 50px rgba(0, 212, 255, 0.3); }
}

.jarvis-logo-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--glow));
}

.jarvis-logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--jarvis-blue), var(--jarvis-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jarvis-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.jarvis-status-dot {
  width: 8px;
  height: 8px;
  background: var(--jarvis-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--jarvis-green);
  animation: statusBlink 2s infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════════
   CARDS & PANELS
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-card {
  background: linear-gradient(180deg, rgba(0, 21, 42, 0.8) 0%, rgba(0, 10, 26, 0.9) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.jarvis-card:hover {
  border-color: var(--jarvis-blue);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.jarvis-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.jarvis-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--jarvis-blue);
}

.jarvis-card-body {
  padding: 20px;
}

/* Glass Panel */
.jarvis-glass {
  background: rgba(0, 20, 50, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.jarvis-btn-primary {
  background: linear-gradient(135deg, var(--jarvis-blue), #0066cc);
  border: none;
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.jarvis-btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
  transform: translateY(-2px);
}

.jarvis-btn-secondary {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--border-glow);
  color: var(--jarvis-cyan);
}

.jarvis-btn-secondary:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--jarvis-blue);
}

.jarvis-btn-ghost {
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--text-secondary);
}

.jarvis-btn-ghost:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--jarvis-blue);
  color: var(--jarvis-cyan);
}

/* ═══════════════════════════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 20, 50, 0.6);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all 0.3s;
}

.jarvis-input:focus {
  outline: none;
  border-color: var(--jarvis-blue);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.jarvis-input::placeholder {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-nav {
  display: flex;
  gap: 5px;
}

.jarvis-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.jarvis-nav-item:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.jarvis-nav-item.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 100, 200, 0.1));
  border: 1px solid var(--jarvis-blue);
  color: var(--jarvis-cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════
   BADGES & STATUS
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.jarvis-badge-success {
  background: rgba(0, 255, 136, 0.15);
  color: var(--jarvis-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.jarvis-badge-warning {
  background: rgba(255, 149, 0, 0.15);
  color: var(--jarvis-orange);
  border: 1px solid rgba(255, 149, 0, 0.3);
}

.jarvis-badge-danger {
  background: rgba(255, 51, 102, 0.15);
  color: var(--jarvis-red);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.jarvis-badge-info {
  background: rgba(0, 212, 255, 0.15);
  color: var(--jarvis-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════
   STATS & DATA DISPLAY
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-stat {
  text-align: center;
  padding: 20px;
}

.jarvis-stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--jarvis-blue), var(--jarvis-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px var(--glow);
}

.jarvis-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════
   AVATARS
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--jarvis-blue);
  object-fit: cover;
  box-shadow: 0 0 20px var(--glow);
}

.jarvis-avatar-sm {
  width: 40px;
  height: 40px;
  border-width: 2px;
}

.jarvis-avatar-lg {
  width: 80px;
  height: 80px;
  border-width: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   LISTS & ROWS
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-list {
  list-style: none;
}

.jarvis-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.jarvis-list-item:last-child {
  border-bottom: none;
}

.jarvis-list-item:hover {
  background: rgba(0, 212, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-hero {
  text-align: center;
  padding: 80px 20px;
  position: relative;
}

.jarvis-hero h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.jarvis-hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-footer {
  background: rgba(0, 5, 16, 0.95);
  border-top: 1px solid var(--border-glow);
  padding: 40px 30px;
  text-align: center;
}

.jarvis-footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.jarvis-footer a {
  color: var(--jarvis-cyan);
  text-decoration: none;
}

.jarvis-footer a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.jarvis-animate-fade {
  animation: fadeIn 0.5s ease-out;
}

.jarvis-animate-slide {
  animation: slideIn 0.5s ease-out;
}

.jarvis-animate-scale {
  animation: scaleIn 0.3s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-theme::-webkit-scrollbar,
.jarvis-theme *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.jarvis-theme::-webkit-scrollbar-track,
.jarvis-theme *::-webkit-scrollbar-track {
  background: transparent;
}

.jarvis-theme::-webkit-scrollbar-thumb,
.jarvis-theme *::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 4px;
}

.jarvis-theme::-webkit-scrollbar-thumb:hover,
.jarvis-theme *::-webkit-scrollbar-thumb:hover {
  background: var(--jarvis-blue);
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .jarvis-header {
    padding: 10px 15px;
  }
  
  .jarvis-logo-text {
    font-size: 1.1rem;
  }
  
  .jarvis-hero h1 {
    font-size: 2rem;
  }
  
  .jarvis-card-body {
    padding: 15px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════ */

.jarvis-text-cyan { color: var(--jarvis-cyan); }
.jarvis-text-blue { color: var(--jarvis-blue); }
.jarvis-text-green { color: var(--jarvis-green); }
.jarvis-text-gold { color: var(--jarvis-gold); }
.jarvis-text-red { color: var(--jarvis-red); }
.jarvis-text-muted { color: var(--text-muted); }

.jarvis-glow { box-shadow: 0 0 30px var(--glow); }
.jarvis-glow-text { text-shadow: 0 0 20px var(--glow); }

.jarvis-border { border: 1px solid var(--border-glow); }
.jarvis-border-active { border-color: var(--jarvis-blue); }
