/*
 * ShareHands Admin Panel - Design System Theme
 * Modern design tokens and CSS variables
 * Brand: Vibrant Green (#33FF33) + Professional Black
 */

/* ============================================
   DESIGN TOKENS - CSS Custom Properties
   ============================================ */

:root {
  /* ===== Brand Colors ===== */
  --sh-primary-green: #33FF33;
  --sh-primary-green-dark: #2BDB2B;
  --sh-primary-green-darker: #22B722;
  --sh-primary-green-light: #5FFF5F;
  --sh-primary-green-lighter: #8BFF8B;
  --sh-primary-green-pale: #E6FFE6;
  --sh-primary-green-alpha-10: rgba(51, 255, 51, 0.1);
  --sh-primary-green-alpha-20: rgba(51, 255, 51, 0.2);
  --sh-primary-green-alpha-30: rgba(51, 255, 51, 0.3);
  
  --sh-primary-black: #000000;
  --sh-primary-black-soft: #1A1A1A;
  --sh-primary-black-lighter: #2D2D2D;
  
  --sh-white: #FFFFFF;
  --sh-off-white: #FAFAFA;
  
  /* ===== Semantic Colors ===== */
  --sh-success: #33FF33;
  --sh-success-dark: #22B722;
  --sh-success-light: #E6FFE6;
  
  --sh-warning: #FFA500;
  --sh-warning-dark: #E69500;
  --sh-warning-light: #FFF4E6;
  
  --sh-error: #EF4444;
  --sh-error-dark: #DC2626;
  --sh-error-light: #FEE2E2;
  
  --sh-info: #3B82F6;
  --sh-info-dark: #2563EB;
  --sh-info-light: #DBEAFE;
  
  --sh-pending: #8B5CF6;
  --sh-pending-dark: #7C3AED;
  --sh-pending-light: #EDE9FE;
  
  /* ===== Neutral Palette ===== */
  --sh-gray-50: #F9FAFB;
  --sh-gray-100: #F3F4F6;
  --sh-gray-200: #E5E7EB;
  --sh-gray-300: #D1D5DB;
  --sh-gray-400: #9CA3AF;
  --sh-gray-500: #6B7280;
  --sh-gray-600: #4B5563;
  --sh-gray-700: #374151;
  --sh-gray-800: #1F2937;
  --sh-gray-900: #111827;
  
  /* ===== Gradients ===== */
  --sh-gradient-primary: linear-gradient(135deg, #33FF33 0%, #22B722 100%);
  --sh-gradient-primary-hover: linear-gradient(135deg, #5FFF5F 0%, #33FF33 100%);
  --sh-gradient-dark: linear-gradient(135deg, #1A1A1A 0%, #000000 100%);
  --sh-gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  
  /* ===== Typography ===== */
  --sh-font-family-primary: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sh-font-family-mono: 'Monaco', 'Courier New', monospace;
  
  /* Fluid Typography Scale */
  --sh-font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);      /* 12-14px */
  --sh-font-size-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);       /* 14-16px */
  --sh-font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);      /* 16-18px */
  --sh-font-size-md: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);    /* 18-20px */
  --sh-font-size-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);        /* 20-24px */
  --sh-font-size-xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);          /* 24-32px */
  --sh-font-size-2xl: clamp(2rem, 1.75rem + 1.25vw, 3rem);           /* 32-48px */
  
  /* Font Weights */
  --sh-font-weight-normal: 400;
  --sh-font-weight-medium: 500;
  --sh-font-weight-semibold: 600;
  --sh-font-weight-bold: 700;
  
  /* Line Heights */
  --sh-line-height-tight: 1.25;
  --sh-line-height-normal: 1.5;
  --sh-line-height-relaxed: 1.75;
  
  /* ===== Spacing Scale ===== */
  --sh-space-0: 0;
  --sh-space-1: 0.25rem;    /* 4px */
  --sh-space-2: 0.5rem;     /* 8px */
  --sh-space-3: 0.75rem;    /* 12px */
  --sh-space-4: 1rem;       /* 16px */
  --sh-space-5: 1.25rem;    /* 20px */
  --sh-space-6: 1.5rem;     /* 24px */
  --sh-space-8: 2rem;       /* 32px */
  --sh-space-10: 2.5rem;    /* 40px */
  --sh-space-12: 3rem;      /* 48px */
  --sh-space-16: 4rem;      /* 64px */
  --sh-space-20: 5rem;      /* 80px */
  --sh-space-24: 6rem;      /* 96px */
  
  /* ===== Border Radius ===== */
  --sh-radius-none: 0;
  --sh-radius-sm: 0.25rem;    /* 4px */
  --sh-radius-base: 0.5rem;   /* 8px */
  --sh-radius-md: 0.75rem;    /* 12px */
  --sh-radius-lg: 1rem;       /* 16px */
  --sh-radius-xl: 1.5rem;     /* 24px */
  --sh-radius-2xl: 2rem;      /* 32px */
  --sh-radius-full: 9999px;
  
  /* ===== Shadows (Elevation System) ===== */
  --sh-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --sh-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --sh-shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --sh-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --sh-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --sh-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --sh-shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
  --sh-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  
  /* Green-tinted shadows for hover states */
  --sh-shadow-green: 0 4px 14px 0 rgba(51, 255, 51, 0.2);
  --sh-shadow-green-lg: 0 10px 30px 0 rgba(51, 255, 51, 0.3);
  
  /* ===== Animation Timing ===== */
  --sh-transition-fast: 150ms;
  --sh-transition-base: 250ms;
  --sh-transition-slow: 350ms;
  --sh-transition-slower: 500ms;
  
  /* Easing Functions */
  --sh-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --sh-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --sh-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --sh-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* ===== Z-Index Scale ===== */
  --sh-z-base: 0;
  --sh-z-dropdown: 1000;
  --sh-z-sticky: 1020;
  --sh-z-fixed: 1030;
  --sh-z-modal-backdrop: 1040;
  --sh-z-modal: 1050;
  --sh-z-popover: 1060;
  --sh-z-tooltip: 1070;
  --sh-z-toast: 1080;
  
  /* ===== Layout Dimensions ===== */
  --sh-sidebar-width: 260px;
  --sh-sidebar-collapsed-width: 70px;
  --sh-topbar-height: 70px;
  --sh-content-max-width: 1440px;
  
  /* ===== Breakpoints (for reference in JS) ===== */
  --sh-breakpoint-xs: 0px;
  --sh-breakpoint-sm: 576px;
  --sh-breakpoint-md: 768px;
  --sh-breakpoint-lg: 992px;
  --sh-breakpoint-xl: 1200px;
  --sh-breakpoint-xxl: 1400px;
}

/* ============================================
   GLASS MORPHISM EFFECTS
   ============================================ */

.sh-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sh-glass-dark {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Colors */
.sh-text-primary { color: var(--sh-primary-green) !important; }
.sh-text-success { color: var(--sh-success) !important; }
.sh-text-warning { color: var(--sh-warning) !important; }
.sh-text-error { color: var(--sh-error) !important; }
.sh-text-info { color: var(--sh-info) !important; }
.sh-text-pending { color: var(--sh-pending) !important; }

/* Background Colors */
.sh-bg-primary { background-color: var(--sh-primary-green) !important; }
.sh-bg-primary-light { background-color: var(--sh-primary-green-pale) !important; }
.sh-bg-success { background-color: var(--sh-success) !important; }
.sh-bg-success-light { background-color: var(--sh-success-light) !important; }
.sh-bg-warning { background-color: var(--sh-warning) !important; }
.sh-bg-warning-light { background-color: var(--sh-warning-light) !important; }
.sh-bg-error { background-color: var(--sh-error) !important; }
.sh-bg-error-light { background-color: var(--sh-error-light) !important; }
.sh-bg-info { background-color: var(--sh-info) !important; }
.sh-bg-info-light { background-color: var(--sh-info-light) !important; }
.sh-bg-pending { background-color: var(--sh-pending) !important; }
.sh-bg-pending-light { background-color: var(--sh-pending-light) !important; }

/* Gradient Backgrounds */
.sh-bg-gradient-primary {
  background: var(--sh-gradient-primary) !important;
}

.sh-bg-gradient-dark {
  background: var(--sh-gradient-dark) !important;
}

/* Shadows */
.sh-shadow-xs { box-shadow: var(--sh-shadow-xs) !important; }
.sh-shadow-sm { box-shadow: var(--sh-shadow-sm) !important; }
.sh-shadow-base { box-shadow: var(--sh-shadow-base) !important; }
.sh-shadow-md { box-shadow: var(--sh-shadow-md) !important; }
.sh-shadow-lg { box-shadow: var(--sh-shadow-lg) !important; }
.sh-shadow-xl { box-shadow: var(--sh-shadow-xl) !important; }
.sh-shadow-2xl { box-shadow: var(--sh-shadow-2xl) !important; }
.sh-shadow-green { box-shadow: var(--sh-shadow-green) !important; }
.sh-shadow-green-lg { box-shadow: var(--sh-shadow-green-lg) !important; }

/* Border Radius */
.sh-rounded-sm { border-radius: var(--sh-radius-sm) !important; }
.sh-rounded { border-radius: var(--sh-radius-base) !important; }
.sh-rounded-md { border-radius: var(--sh-radius-md) !important; }
.sh-rounded-lg { border-radius: var(--sh-radius-lg) !important; }
.sh-rounded-xl { border-radius: var(--sh-radius-xl) !important; }
.sh-rounded-2xl { border-radius: var(--sh-radius-2xl) !important; }
.sh-rounded-full { border-radius: var(--sh-radius-full) !important; }

/* Typography Utilities */
.sh-font-normal { font-weight: var(--sh-font-weight-normal) !important; }
.sh-font-medium { font-weight: var(--sh-font-weight-medium) !important; }
.sh-font-semibold { font-weight: var(--sh-font-weight-semibold) !important; }
.sh-font-bold { font-weight: var(--sh-font-weight-bold) !important; }

.sh-text-xs { font-size: var(--sh-font-size-xs) !important; }
.sh-text-sm { font-size: var(--sh-font-size-sm) !important; }
.sh-text-base { font-size: var(--sh-font-size-base) !important; }
.sh-text-md { font-size: var(--sh-font-size-md) !important; }
.sh-text-lg { font-size: var(--sh-font-size-lg) !important; }
.sh-text-xl { font-size: var(--sh-font-size-xl) !important; }
.sh-text-2xl { font-size: var(--sh-font-size-2xl) !important; }

/* Transitions */
.sh-transition {
  transition: all var(--sh-transition-base) var(--sh-ease-out);
}

.sh-transition-fast {
  transition: all var(--sh-transition-fast) var(--sh-ease-out);
}

.sh-transition-slow {
  transition: all var(--sh-transition-slow) var(--sh-ease-out);
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
   ============================================ */

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sh-font-family-primary);
  font-size: var(--sh-font-size-base);
  line-height: var(--sh-line-height-normal);
  color: var(--sh-gray-700);
  background-color: var(--sh-gray-50);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better focus states */
*:focus {
  outline: 2px solid var(--sh-primary-green);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Selection color */
::selection {
  background-color: var(--sh-primary-green-alpha-30);
  color: var(--sh-primary-black);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--sh-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--sh-gray-400);
  border-radius: var(--sh-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--sh-primary-green);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduced motion support */
@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;
  }
}

