/* ============================================
   GENIVEST DESIGN SYSTEM v1.0
   A comprehensive design system for Genivest brand
   ============================================ */

/* ============================================
   CSS VARIABLES (DESIGN TOKENS)
   ============================================ */
:root {
    /* Brand Colors */
    --genivest-primary: #F9D71C;
    --genivest-primary-light: #FFE55C;
    --genivest-primary-dark: #D4B817;
    
    /* Dark Theme Colors */
    --genivest-dark: #1a1a1a;
    --genivest-dark-secondary: #2a2a2a;
    --genivest-dark-tertiary: #3a3a3a;
    --genivest-dark-quaternary: #0d0d0d;
    
    /* Text Colors */
    --genivest-text-primary: #ffffff;
    --genivest-text-secondary: #cccccc;
    --genivest-text-muted: #999999;
    --genivest-text-disabled: #666666;
    
    /* Semantic Colors */
    --genivest-success: #4CAF50;
    --genivest-warning: #FF9800;
    --genivest-error: #F44336;
    --genivest-info: #2196F3;
    
    /* Border & Divider */
    --genivest-border: #444444;
    --genivest-border-light: #555555;
    --genivest-divider: #333333;
    
    /* Gradients */
    --genivest-gradient-primary: linear-gradient(135deg, #F9D71C 0%, #FFE55C 100%);
    --genivest-gradient-dark: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    
    /* Shadows */
    --genivest-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --genivest-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --genivest-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --genivest-shadow-primary: 0 4px 16px rgba(249, 215, 28, 0.3);
    
    /* Border Radius */
    --genivest-radius-sm: 4px;
    --genivest-radius-md: 6px;
    --genivest-radius-lg: 8px;
    --genivest-radius-xl: 12px;
    --genivest-radius-full: 9999px;
    
    /* Transitions */
    --genivest-transition-fast: all 0.15s ease;
    --genivest-transition-base: all 0.3s ease;
    --genivest-transition-slow: all 0.5s ease;
    
    /* Typography */
    --genivest-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --genivest-font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Font Sizes */
    --genivest-text-xs: 0.75rem;
    --genivest-text-sm: 0.875rem;
    --genivest-text-base: 1rem;
    --genivest-text-lg: 1.125rem;
    --genivest-text-xl: 1.25rem;
    --genivest-text-2xl: 1.5rem;
    --genivest-text-3xl: 2rem;
    --genivest-text-4xl: 2.5rem;
    
    /* Spacing */
    --genivest-space-1: 0.25rem;
    --genivest-space-2: 0.5rem;
    --genivest-space-3: 0.75rem;
    --genivest-space-4: 1rem;
    --genivest-space-5: 1.25rem;
    --genivest-space-6: 1.5rem;
    --genivest-space-8: 2rem;
    --genivest-space-10: 2.5rem;
    --genivest-space-12: 3rem;
}

/* ============================================
   BUTTON COMPONENTS
   ============================================ */

.gv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--genivest-space-2);
    padding: 12px 24px;
    font-family: var(--genivest-font-family);
    font-size: var(--genivest-text-base);
    font-weight: 600;
    border: none;
    border-radius: var(--genivest-radius-md);
    cursor: pointer;
    transition: var(--genivest-transition-base);
    outline: none;
}

.gv-btn-primary {
    background: var(--genivest-gradient-primary);
    color: var(--genivest-dark);
    box-shadow: var(--genivest-shadow-primary);
}

.gv-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 215, 28, 0.5);
}

.gv-btn-secondary {
    background: transparent;
    color: var(--genivest-primary);
    border: 2px solid var(--genivest-primary);
}

.gv-btn-secondary:hover {
    background: var(--genivest-primary);
    color: var(--genivest-dark);
}

.gv-btn-success {
    background: var(--genivest-success);
    color: white;
}

.gv-btn-warning {
    background: var(--genivest-warning);
    color: white;
}

.gv-btn-error {
    background: var(--genivest-error);
    color: white;
}

.gv-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   FORM COMPONENTS
   ============================================ */

.gv-input {
    padding: 12px 16px;
    background: var(--genivest-dark-tertiary);
    border: 2px solid var(--genivest-border);
    border-radius: var(--genivest-radius-md);
    color: var(--genivest-text-primary);
    font-family: var(--genivest-font-family);
    font-size: var(--genivest-text-base);
    transition: var(--genivest-transition-base);
    outline: none;
    width: 100%;
}

.gv-input:focus {
    border-color: var(--genivest-primary);
    box-shadow: 0 0 0 3px rgba(249, 215, 28, 0.2);
}

.gv-input:hover {
    border-color: var(--genivest-primary);
}

.gv-label {
    display: flex;
    align-items: center;
    gap: var(--genivest-space-2);
    font-weight: 600;
    color: var(--genivest-text-primary);
    font-size: var(--genivest-text-sm);
    margin-bottom: var(--genivest-space-2);
}

.gv-select {
    padding: 12px 16px;
    background: var(--genivest-dark-tertiary);
    border: 2px solid var(--genivest-border);
    border-radius: var(--genivest-radius-md);
    color: var(--genivest-text-primary);
    font-family: var(--genivest-font-family);
    font-size: var(--genivest-text-base);
    transition: var(--genivest-transition-base);
    outline: none;
    width: 100%;
    cursor: pointer;
}

.gv-select:focus {
    border-color: var(--genivest-primary);
    box-shadow: 0 0 0 3px rgba(249, 215, 28, 0.2);
}

.gv-select:hover {
    border-color: var(--genivest-primary);
}

/* Range Slider */
.gv-slider {
    width: 100%;
    height: 6px;
    background: var(--genivest-dark-tertiary);
    border-radius: 3px;
    border: 1px solid var(--genivest-border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: var(--genivest-transition-base);
}

.gv-slider:hover {
    border-color: var(--genivest-primary);
}

.gv-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--genivest-gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(249, 215, 28, 0.4);
    transition: var(--genivest-transition-base);
}

.gv-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(249, 215, 28, 0.6);
}

.gv-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--genivest-gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(249, 215, 28, 0.4);
    transition: var(--genivest-transition-base);
}

/* Radio Buttons */
.gv-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--genivest-space-4);
}

.gv-radio-option {
    position: relative;
}

.gv-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.gv-radio-option label {
    display: block;
    padding: 15px 20px;
    background: var(--genivest-dark-tertiary);
    border: 2px solid var(--genivest-border);
    border-radius: var(--genivest-radius-md);
    cursor: pointer;
    transition: var(--genivest-transition-base);
    text-align: center;
    font-weight: 500;
    color: var(--genivest-text-secondary);
}

.gv-radio-option input[type="radio"]:checked + label {
    background: var(--genivest-primary);
    color: var(--genivest-dark);
    border-color: var(--genivest-primary);
    font-weight: 700;
}

/* ============================================
   CARD COMPONENTS
   ============================================ */

.gv-card {
    background: var(--genivest-dark-secondary);
    padding: var(--genivest-space-6);
    border-radius: var(--genivest-radius-md);
    border: 1px solid var(--genivest-border);
    box-shadow: var(--genivest-shadow-sm);
}

.gv-card-header {
    margin-bottom: var(--genivest-space-4);
    padding-bottom: var(--genivest-space-4);
    border-bottom: 1px solid var(--genivest-border);
}

.gv-card-title {
    font-size: var(--genivest-text-xl);
    font-weight: 700;
    color: var(--genivest-text-primary);
    margin: 0;
}

.gv-card-subtitle {
    font-size: var(--genivest-text-sm);
    color: var(--genivest-text-secondary);
    margin: var(--genivest-space-2) 0 0;
}

/* ============================================
   TOOLTIP COMPONENT
   ============================================ */

.gv-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--genivest-dark-tertiary);
    color: var(--genivest-primary);
    border: 1px solid var(--genivest-border);
    border-radius: 50%;
    font-size: var(--genivest-text-xs);
    font-weight: 700;
    cursor: help;
    position: relative;
    transition: var(--genivest-transition-base);
}

.gv-tooltip:hover {
    background: var(--genivest-primary);
    color: var(--genivest-dark);
    border-color: var(--genivest-primary);
    transform: scale(1.1);
}

.gv-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--genivest-dark-tertiary);
    color: var(--genivest-text-primary);
    border: 1px solid var(--genivest-primary);
    border-radius: var(--genivest-radius-md);
    font-size: var(--genivest-text-sm);
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    box-shadow: var(--genivest-shadow-md);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gv-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.gv-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--genivest-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.gv-tooltip:hover::before {
    opacity: 1;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */

.gv-text-gradient {
    background: var(--genivest-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gv-text-xs { font-size: var(--genivest-text-xs); }
.gv-text-sm { font-size: var(--genivest-text-sm); }
.gv-text-base { font-size: var(--genivest-text-base); }
.gv-text-lg { font-size: var(--genivest-text-lg); }
.gv-text-xl { font-size: var(--genivest-text-xl); }
.gv-text-2xl { font-size: var(--genivest-text-2xl); }
.gv-text-3xl { font-size: var(--genivest-text-3xl); }
.gv-text-4xl { font-size: var(--genivest-text-4xl); }

.gv-text-primary { color: var(--genivest-text-primary); }
.gv-text-secondary { color: var(--genivest-text-secondary); }
.gv-text-muted { color: var(--genivest-text-muted); }

.gv-font-normal { font-weight: 400; }
.gv-font-medium { font-weight: 500; }
.gv-font-semibold { font-weight: 600; }
.gv-font-bold { font-weight: 700; }

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.gv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--genivest-space-4);
}

.gv-flex {
    display: flex;
}

.gv-flex-col {
    display: flex;
    flex-direction: column;
}

.gv-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gv-grid {
    display: grid;
}

.gv-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--genivest-space-4);
}

.gv-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--genivest-space-4);
}

/* ============================================
   SPACING UTILITIES
   ============================================ */

.gv-gap-1 { gap: var(--genivest-space-1); }
.gv-gap-2 { gap: var(--genivest-space-2); }
.gv-gap-3 { gap: var(--genivest-space-3); }
.gv-gap-4 { gap: var(--genivest-space-4); }
.gv-gap-6 { gap: var(--genivest-space-6); }
.gv-gap-8 { gap: var(--genivest-space-8); }

.gv-p-2 { padding: var(--genivest-space-2); }
.gv-p-4 { padding: var(--genivest-space-4); }
.gv-p-6 { padding: var(--genivest-space-6); }
.gv-p-8 { padding: var(--genivest-space-8); }

.gv-m-2 { margin: var(--genivest-space-2); }
.gv-m-4 { margin: var(--genivest-space-4); }
.gv-m-6 { margin: var(--genivest-space-6); }
.gv-m-8 { margin: var(--genivest-space-8); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .gv-grid-2,
    .gv-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .gv-container {
        padding: 0 var(--genivest-space-3);
    }
}

/* ============================================
   GLOBAL STYLES (Optional - Apply to body)
   ============================================ */

body.genivest-theme {
    font-family: var(--genivest-font-family);
    background: var(--genivest-dark-quaternary);
    color: var(--genivest-text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}
