/* ============================================
   SUPPLYSPHERE ENTERPRISE PROFESSIONAL DESIGN
   Industry Best Practices for B2B SaaS Platforms
   Color Psychology & Accessibility Compliant
   ============================================ */

/* ============================================
   COLOR SYSTEM - Based on Industry Leaders
   Inspired by: Salesforce, SAP, Oracle, IBM
   ============================================ */

:root {
    /* PRIMARY BRAND COLORS - Professional Blue Spectrum */
    /* Research shows blue conveys trust, reliability, and professionalism in B2B */
    --brand-primary: #0052CC;        /* Deep Professional Blue - Primary actions */
    --brand-primary-dark: #003D99;   /* Darker variant - Hover states */
    --brand-primary-light: #4C9AFF;  /* Lighter variant - Accents */
    --brand-primary-pale: #E6F2FF;   /* Very light - Backgrounds */
    
    /* SECONDARY COLORS - Success & Growth */
    --brand-success: #00875A;        /* Professional Green - Success states */
    --brand-success-light: #E3FCEF;  /* Light green background */
    
    /* ACCENT COLORS - Strategic Use */
    --brand-accent: #6554C0;         /* Purple - Innovation, Premium features */
    --brand-accent-light: #EAE6FF;   /* Light purple background */
    
    /* WARNING & ERROR - Clear Communication */
    --brand-warning: #FF991F;        /* Amber - Warnings */
    --brand-warning-light: #FFF4E5;  /* Light amber background */
    --brand-error: #DE350B;          /* Red - Errors */
    --brand-error-light: #FFEBE6;    /* Light red background */
    
    /* NEUTRAL PALETTE - Professional Grays */
    /* Carefully calibrated for optimal readability and hierarchy */
    --neutral-0: #FFFFFF;            /* Pure white */
    --neutral-50: #FAFBFC;           /* Off-white backgrounds */
    --neutral-100: #F4F5F7;          /* Light gray backgrounds */
    --neutral-200: #EBECF0;          /* Borders, dividers */
    --neutral-300: #DFE1E6;          /* Disabled states */
    --neutral-400: #C1C7D0;          /* Placeholder text */
    --neutral-500: #A5ADBA;          /* Secondary text */
    --neutral-600: #7A869A;          /* Body text */
    --neutral-700: #505F79;          /* Headings */
    --neutral-800: #344563;          /* Dark headings */
    --neutral-900: #172B4D;          /* Maximum contrast */
    
    /* SEMANTIC COLORS - Clear Meaning */
    --color-info: #0065FF;
    --color-info-light: #E6F2FF;
    
    /* GRADIENTS - Subtle & Professional */
    --gradient-primary: linear-gradient(135deg, #0052CC 0%, #4C9AFF 100%);
    --gradient-success: linear-gradient(135deg, #00875A 0%, #36B37E 100%);
    --gradient-premium: linear-gradient(135deg, #6554C0 0%, #8777D9 100%);
    --gradient-hero: linear-gradient(135deg, #172B4D 0%, #0052CC 100%);
    
    /* SHADOWS - Professional Depth */
    /* Based on Material Design elevation system */
    --shadow-1: 0 1px 3px rgba(23, 43, 77, 0.12);
    --shadow-2: 0 2px 6px rgba(23, 43, 77, 0.15);
    --shadow-3: 0 4px 12px rgba(23, 43, 77, 0.15);
    --shadow-4: 0 8px 24px rgba(23, 43, 77, 0.15);
    --shadow-5: 0 12px 36px rgba(23, 43, 77, 0.18);
    --shadow-6: 0 16px 48px rgba(23, 43, 77, 0.20);
    
    /* TYPOGRAPHY */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', monospace;
    
    /* SPACING - 8px base grid system */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    
    /* BORDER RADIUS - Consistent rounding */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;
    
    /* TRANSITIONS - Smooth & Professional */
    --transition-fast: 100ms cubic-bezier(0.2, 0, 0.38, 0.9);
    --transition-base: 200ms cubic-bezier(0.2, 0, 0.38, 0.9);
    --transition-slow: 300ms cubic-bezier(0.2, 0, 0.38, 0.9);
    
    /* Z-INDEX SCALE */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--neutral-700);
    background-color: var(--neutral-50);
}

/* ============================================
   TYPOGRAPHY - Professional Hierarchy
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
}

h1 { font-size: 2.5rem; font-weight: 700; }      /* 40px */
h2 { font-size: 2rem; font-weight: 600; }        /* 32px */
h3 { font-size: 1.5rem; font-weight: 600; }      /* 24px */
h4 { font-size: 1.25rem; font-weight: 600; }     /* 20px */
h5 { font-size: 1rem; font-weight: 600; }        /* 16px */
h6 { font-size: 0.875rem; font-weight: 600; }    /* 14px */

p {
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.text-large {
    font-size: 1.125rem;
    line-height: 1.7;
}

.text-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ============================================
   BUTTONS - Professional & Accessible
   ============================================ */

.btn-enterprise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-enterprise:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.2);
}

/* Primary Button - Main actions */
.btn-primary {
    background-color: var(--brand-primary);
    color: var(--neutral-0);
    box-shadow: var(--shadow-2);
}

.btn-primary:hover {
    background-color: var(--brand-primary-dark);
    box-shadow: var(--shadow-3);
    transform: translateY(-1px);
    color: var(--neutral-0);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-1);
}

/* Secondary Button - Less emphasis */
.btn-secondary {
    background-color: var(--neutral-0);
    color: var(--brand-primary);
    border-color: var(--neutral-200);
}

.btn-secondary:hover {
    background-color: var(--neutral-50);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Success Button */
.btn-success {
    background-color: var(--brand-success);
    color: var(--neutral-0);
}

.btn-success:hover {
    background-color: #006644;
    color: var(--neutral-0);
}

/* Outline Button */
.btn-outline {
    background-color: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline:hover {
    background-color: var(--brand-primary-pale);
    color: var(--brand-primary);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8125rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: 1.125rem;
}

/* ============================================
   CARDS - Professional Containers
   ============================================ */

.card-enterprise {
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-1);
    transition: all var(--transition-base);
}

.card-enterprise:hover {
    box-shadow: var(--shadow-3);
    transform: translateY(-2px);
    border-color: var(--brand-primary-light);
}

.card-header-enterprise {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--neutral-200);
}

.card-title-enterprise {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0;
}

.card-icon-enterprise {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary-pale);
    color: var(--brand-primary);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

/* ============================================
   FORMS - Professional Input Design
   ============================================ */

.form-group-enterprise {
    margin-bottom: var(--space-5);
}

.form-label-enterprise {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: var(--space-2);
}

.form-input-enterprise,
.form-select-enterprise,
.form-textarea-enterprise {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    color: var(--neutral-800);
    background-color: var(--neutral-0);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-input-enterprise:focus,
.form-select-enterprise:focus,
.form-textarea-enterprise:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-pale);
}

.form-input-enterprise::placeholder {
    color: var(--neutral-400);
}

.form-textarea-enterprise {
    min-height: 120px;
    resize: vertical;
}

.form-select-enterprise {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23505F79' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-10);
}

/* ============================================
   BADGES & TAGS
   ============================================ */

.badge-enterprise {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: var(--brand-primary-pale);
    color: var(--brand-primary);
}

.badge-success {
    background-color: var(--brand-success-light);
    color: var(--brand-success);
}

.badge-warning {
    background-color: var(--brand-warning-light);
    color: var(--brand-warning);
}

.badge-error {
    background-color: var(--brand-error-light);
    color: var(--brand-error);
}

.badge-info {
    background-color: var(--color-info-light);
    color: var(--color-info);
}

.badge-neutral {
    background-color: var(--neutral-100);
    color: var(--neutral-700);
}

/* ============================================
   NAVIGATION - Enterprise Header
   ============================================ */

.nav-enterprise {
    background-color: var(--neutral-0);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-1);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.nav-container-enterprise {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo-enterprise {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
}

.nav-links-enterprise {
    display: flex;
    gap: var(--space-8);
    list-style: none;
    margin: 0;
}

.nav-link-enterprise {
    color: var(--neutral-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link-enterprise:hover {
    color: var(--brand-primary);
}

.nav-link-enterprise.active {
    color: var(--brand-primary);
    font-weight: 600;
}

.nav-link-enterprise.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--brand-primary);
}

/* ============================================
   HERO SECTIONS - Professional
   ============================================ */

.hero-enterprise {
    background: var(--gradient-hero);
    color: var(--neutral-0);
    padding: var(--space-20) var(--space-6);
    position: relative;
    overflow: hidden;
}

.hero-enterprise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(76, 154, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(101, 84, 192, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content-enterprise {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title-enterprise {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-5);
    color: var(--neutral-0);
}

.hero-subtitle-enterprise {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto var(--space-8);
}

.hero-cta-group {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   STATS & METRICS
   ============================================ */

.stats-grid-enterprise {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
}

.stat-card-enterprise {
    background: var(--neutral-0);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-1);
    transition: all var(--transition-base);
}

.stat-card-enterprise:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3);
    border-color: var(--brand-primary);
}

.stat-value-enterprise {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-label-enterprise {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-3);
    font-size: 0.875rem;
    font-weight: 600;
}

.trend-up {
    color: var(--brand-success);
}

.trend-down {
    color: var(--brand-error);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container-enterprise {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section-enterprise {
    padding: var(--space-16) 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--brand-primary); }
.text-success { color: var(--brand-success); }
.text-warning { color: var(--brand-warning); }
.text-error { color: var(--brand-error); }
.text-muted { color: var(--neutral-500); }

.bg-primary { background-color: var(--brand-primary); }
.bg-light { background-color: var(--neutral-50); }
.bg-white { background-color: var(--neutral-0); }

/* Spacing utilities */
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* ============================================
   ANIMATIONS - Subtle & Professional
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out;
}

/* ============================================
   LOADING STATES
   ============================================ */

.spinner-enterprise {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .hero-title-enterprise {
        font-size: 2.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .hero-title-enterprise {
        font-size: 2rem;
    }
    
    .hero-subtitle-enterprise {
        font-size: 1.125rem;
    }
    
    .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-grid-enterprise {
        grid-template-columns: 1fr;
    }
    
    .nav-links-enterprise {
        gap: var(--space-4);
    }
}

/* ============================================
   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;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
