/**
 * ====================================================================================================
 *   NIGAMA CONNECT ADMIN PORTAL — OFFICIAL LUXURY DESIGN SYSTEM TOKENS
 *   File: css/v5/variables.css
 *   Architecture: CSS3 Custom Properties Design Token System
 *   Standard: Luxury Glassmorphism, Fluid Clamp Typography & Cosmic Spatial Depth
 *   Reference: webofficial_appnigamaconnect/css/variables.css
 * ====================================================================================================
 */

:root {
  /* --------------------------------------------------------------------------------------------------
   * 1. BRAND IDENTITY & EXTENDED COLOR PALETTE
   * -------------------------------------------------------------------------------------------------- */
  /* Primary Brand Cyan (Active highlights, primary CTAs, focus outlines) */
  --nc-brand-primary: #0FA3D9;
  --nc-brand-primary-rgb: 15, 163, 217;
  --nc-brand-primary-hover: #0284C7;
  --nc-brand-primary-active: #0369A1;
  --nc-brand-primary-glow: rgba(15, 163, 217, 0.35);
  --nc-brand-primary-subtle: rgba(15, 163, 217, 0.12);

  /* Kinship Emerald & Growth Mint (Verified users, active status, success toasts) */
  --nc-brand-secondary: #10B981;
  --nc-brand-secondary-rgb: 16, 185, 129;
  --nc-brand-secondary-light: #4FD8A0;
  --nc-brand-mint: #4FD8A0;
  --nc-brand-mint-rgb: 79, 216, 160;
  --nc-brand-secondary-hover: #059669;
  --nc-brand-secondary-glow: rgba(16, 185, 129, 0.35);
  --nc-brand-secondary-subtle: rgba(16, 185, 129, 0.12);

  /* Sunrise Warm Orange (Reminders, pending warnings, festive highlights, Gotram) */
  --nc-brand-accent: #FFA24D;
  --nc-brand-accent-rgb: 255, 162, 77;
  --nc-brand-accent-hover: #EA580C;
  --nc-brand-accent-glow: rgba(255, 162, 77, 0.35);
  --nc-brand-accent-subtle: rgba(255, 162, 77, 0.12);

  /* Sacred Vedic Gold (Self node aura, heritage badges, sacred honors, superadmin) */
  --nc-brand-gold: #F59E0B;
  --nc-brand-gold-rgb: 245, 158, 11;
  --nc-brand-gold-glow: rgba(245, 158, 11, 0.35);
  --nc-brand-gold-subtle: rgba(245, 158, 11, 0.12);

  /* Royal Violet & Community Ceremonies (Events, classifieds) */
  --nc-brand-purple: #8B5CF6;
  --nc-brand-purple-rgb: 139, 92, 246;
  --nc-brand-purple-glow: rgba(139, 92, 246, 0.3);
  --nc-brand-purple-subtle: rgba(139, 92, 246, 0.12);

  /* Matrimony Sacred Rose */
  --nc-brand-rose: #EC4899;
  --nc-brand-rose-rgb: 236, 72, 153;
  --nc-brand-rose-glow: rgba(236, 72, 153, 0.3);
  --nc-brand-rose-subtle: rgba(236, 72, 153, 0.12);

  /* Crimson Danger & Moderation Strikes */
  --nc-brand-danger: #EF4444;
  --nc-brand-danger-rgb: 239, 68, 68;
  --nc-brand-danger-hover: #DC2626;
  --nc-brand-danger-glow: rgba(239, 68, 68, 0.35);
  --nc-brand-danger-subtle: rgba(239, 68, 68, 0.12);

  /* --------------------------------------------------------------------------------------------------
   * 2. THEME SURFACES: DARK MODE (DEFAULT)
   * -------------------------------------------------------------------------------------------------- */
  --nc-bg-main: #020617;
  --nc-bg-radial: radial-gradient(circle at 50% 0%, #0B1933 0%, #020617 85%);
  --nc-surface-card: #0B1528;
  --nc-surface-card-hover: #0F1D38;
  --nc-surface-hover: #0F1D38;
  --nc-surface-elevated: #11203B;
  --nc-surface-dock: rgba(11, 21, 40, 0.85);
  --nc-surface-glass: rgba(15, 29, 56, 0.65);
  --nc-surface-glass-active: rgba(25, 45, 85, 0.75);

  /* Text & Content Tokens */
  --nc-text-primary: #F8FAFC;
  --nc-text-secondary: #94A3B8;
  --nc-text-muted: #64748B;
  --nc-text-dim: #475569;
  --nc-text-inverse: #020617;

  /* Glass Borders & Specular Sheen */
  --nc-border-glass: rgba(255, 255, 255, 0.12);
  --nc-border-glass-subtle: rgba(255, 255, 255, 0.06);
  --nc-border-glass-strong: rgba(255, 255, 255, 0.22);
  --nc-border-subtle: rgba(255, 255, 255, 0.08);
  --nc-border-glow-primary: rgba(15, 163, 217, 0.45);
  --nc-border-glow-gold: rgba(245, 158, 11, 0.45);

  /* Ambient Mesh Gradients & Overlays */
  --nc-mesh-gradient: radial-gradient(at 15% 15%, rgba(15, 163, 217, 0.15) 0px, transparent 60%),
                      radial-gradient(at 85% 20%, rgba(16, 185, 129, 0.12) 0px, transparent 60%),
                      radial-gradient(at 50% 80%, rgba(245, 158, 11, 0.08) 0px, transparent 70%);

  /* --------------------------------------------------------------------------------------------------
   * 3. TYPOGRAPHY SYSTEM
   * -------------------------------------------------------------------------------------------------- */
  --nc-font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nc-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nc-font-mono: 'JetBrains Mono', monospace;

  --nc-fs-display: clamp(2.25rem, 5vw + 1rem, 4rem);
  --nc-fs-h1: clamp(1.8rem, 3.5vw + 0.5rem, 3rem);
  --nc-fs-h2: clamp(1.4rem, 2.5vw + 0.25rem, 2.2rem);
  --nc-fs-h3: clamp(1.15rem, 1.8vw + 0.2rem, 1.6rem);
  --nc-fs-h4: clamp(1rem, 1.2vw + 0.1rem, 1.25rem);
  --nc-fs-body: clamp(0.875rem, 0.8vw + 0.2rem, 1rem);
  --nc-fs-small: clamp(0.78rem, 0.7vw + 0.15rem, 0.875rem);
  --nc-fs-tiny: clamp(0.68rem, 0.6vw + 0.1rem, 0.75rem);

  --nc-lh-tight: 1.15;
  --nc-lh-snug: 1.3;
  --nc-lh-normal: 1.6;
  --nc-lh-relaxed: 1.75;

  /* --------------------------------------------------------------------------------------------------
   * 4. SPATIAL ELEVATION, RADIUS & SHADOW TOKENS
   * -------------------------------------------------------------------------------------------------- */
  --nc-radius-sm: 8px;
  --nc-radius-md: 14px;
  --nc-radius-lg: 20px;
  --nc-radius-xl: 28px;
  --nc-radius-full: 9999px;

  --nc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --nc-shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --nc-shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
  --nc-shadow-glow: 0 0 40px -10px var(--nc-brand-primary-glow);
  --nc-shadow-gold-glow: 0 0 35px -8px var(--nc-brand-gold-glow);

  /* Backdrop Blur Filters */
  --nc-blur-dock: blur(24px) saturate(180%);
  --nc-blur-card: blur(20px) saturate(160%);
  --nc-blur-modal: blur(32px) saturate(190%);

  /* --------------------------------------------------------------------------------------------------
   * 5. MOTION PHYSICS & EASING TOKENS
   * -------------------------------------------------------------------------------------------------- */
  --nc-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --nc-ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --nc-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --nc-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --nc-dur-fast: 180ms;
  --nc-dur-base: 320ms;
  --nc-dur-slow: 600ms;

  /* --------------------------------------------------------------------------------------------------
   * 6. LAYOUT & RESPONSIVE CONSTANTS
   * -------------------------------------------------------------------------------------------------- */
  --nc-sidebar-width: 260px;
  --nc-sidebar-collapsed-width: 76px;
  --nc-header-h: 70px;
  --nc-mobile-bottom-h: 68px;
  --nc-safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* --------------------------------------------------------------------------------------------------
   * 7. BACKWARD COMPATIBILITY ALIASES FOR LEGACY THEME VARIABLES
   * -------------------------------------------------------------------------------------------------- */
  --brand-primary: var(--nc-brand-primary);
  --brand-secondary: var(--nc-brand-secondary);
  --brand-accent: var(--nc-brand-accent);
  --brand-danger: var(--nc-brand-danger);
  --bg-primary: var(--nc-bg-main);
  --bg-secondary: var(--nc-surface-card);
  --bg-tertiary: var(--nc-surface-elevated);
  --surface-color: var(--nc-surface-card);
  --text-primary: var(--nc-text-primary);
  --text-secondary: var(--nc-text-secondary);
  --text-light: var(--nc-text-muted);
  --border-color: var(--nc-border-glass);
  --border-glass: var(--nc-border-glass);
  --transition-speed: 0.25s;
}

/* --------------------------------------------------------------------------------------------------
 * 2B. THEME SURFACES: LIGHT MODE (LUXURY DAYLIGHT)
 * -------------------------------------------------------------------------------------------------- */
:root[data-theme="light"] {
  --nc-bg-main: #F8FAFC;
  --nc-bg-radial: radial-gradient(circle at 50% 0%, #EDF2F7 0%, #F8FAFC 85%);
  --nc-surface-card: #FFFFFF;
  --nc-surface-card-hover: #F8FAFC;
  --nc-surface-hover: #F1F5F9;
  --nc-surface-elevated: #FFFFFF;
  --nc-surface-dock: rgba(255, 255, 255, 0.94);
  --nc-surface-glass: rgba(255, 255, 255, 0.88);
  --nc-surface-glass-active: rgba(241, 245, 249, 0.95);

  /* Text & Content Tokens */
  --nc-text-primary: #0F172A;
  --nc-text-secondary: #475569;
  --nc-text-muted: #64748B;
  --nc-text-dim: #94A3B8;
  --nc-text-inverse: #FFFFFF;

  /* Glass Borders & Specular Sheen */
  --nc-border-glass: rgba(15, 23, 42, 0.1);
  --nc-border-glass-subtle: rgba(15, 23, 42, 0.05);
  --nc-border-glass-strong: rgba(15, 23, 42, 0.18);
  --nc-border-subtle: rgba(15, 23, 42, 0.08);
  --nc-border-glow-primary: rgba(15, 163, 217, 0.5);
  --nc-border-glow-gold: rgba(245, 158, 11, 0.5);

  /* Soft Ambient Daylight Gradients */
  --nc-mesh-gradient: radial-gradient(at 15% 15%, rgba(15, 163, 217, 0.08) 0px, transparent 60%),
                      radial-gradient(at 85% 20%, rgba(16, 185, 129, 0.06) 0px, transparent 60%),
                      radial-gradient(at 50% 80%, rgba(245, 158, 11, 0.05) 0px, transparent 70%);

  /* Ambient Drop Shadows for Light Mode */
  --nc-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --nc-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --nc-shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.1);
  --nc-shadow-xl: 0 16px 40px rgba(15, 23, 42, 0.12);
  --nc-shadow-glow-primary: 0 0 20px rgba(15, 163, 217, 0.25);
}

/* --------------------------------------------------------------------------------------------------
 * MOTION GRAPHICS & ADVANCED CARD TEMPLATE UTILITIES
 * -------------------------------------------------------------------------------------------------- */
@keyframes liquidShine {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(200%) rotate(25deg); }
}

@keyframes pulseStatusRing {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(15, 163, 217, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(15, 163, 217, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(15, 163, 217, 0); }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.nc-motion-shine {
  position: relative;
  overflow: hidden;
}

.nc-motion-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 60%
  );
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nc-motion-shine:hover::after {
  opacity: 1;
  animation: liquidShine 1.2s ease forwards;
}

.nc-card-3d {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  will-change: transform;
}

.nc-card-3d:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(15, 163, 217, 0.25);
  border-color: rgba(15, 163, 217, 0.45);
}


/* ----------------------------------------------------------------------------------------------------
 * WCAG 2.1 AA ACCESSIBILITY & PREFERS REDUCED MOTION
 * ---------------------------------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--brand-cyan, #0FA3D9) !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .stat-card, .login-card, .post-card, .user-card, .dist-card, .today-card {
    transform: none !important;
  }
  #nc-cursor-ring, #nc-cursor-dot {
    display: none !important;
  }
}
