/* 
 * CRO ANALYST - STITCH CONCEPT C THEME
 * Premium Marketing Analytics UI (Dark Mode, Glassmorphism, Comparison-First)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;700&display=swap');

:root {
    /* Base Colors - Dark Slate Theme */
    --color-bg: #F8FAFC; /* Slate 50 */
    --color-surface: #FFFFFF; /* White */
    --color-surface-hover: #F1F5F9; /* Slate 100 */
    --color-border: #E2E8F0; /* Slate 200 */
    
    /* V1 / V2 Brand Colors - Vibrant */
    --color-brand-v1: #0284c7; /* Sky 600 */ /* Electric Cyan */
    --color-brand-v1-light: rgba(6, 182, 212, 0.15);
    --color-brand-v1-border: rgba(6, 182, 212, 0.4);
    
    --color-brand-v2: #c026d3; /* Fuchsia 600 */ /* Vibrant Fuchsia */
    --color-brand-v2-light: rgba(217, 70, 239, 0.15);
    --color-brand-v2-border: rgba(217, 70, 239, 0.4);
    
    /* Semantic Colors */
    --color-success: #10b981; /* Emerald 500 */
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-warning: #f59e0b; /* Amber 500 */
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-error: #ef4444; /* Red 500 */
    --color-error-bg: rgba(239, 68, 68, 0.1);

    
    /* Typography */
    --color-text-primary: #0F172A; /* Slate 900 */
    --color-text-secondary: #475569; /* Slate 600 */
    --color-text-tertiary: #64748B; /* Slate 500 */
    
    --font-family-primary: 'Inter', sans-serif;
    --font-family-heading: 'Outfit', sans-serif;
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing & Layout */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Effects */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow-v1: 0 0 15px rgba(6, 182, 212, 0.4);
    --shadow-glow-v2: 0 0 15px rgba(217, 70, 239, 0.4);
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-primary);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Glassmorphism Card System */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass);
}

.card-header {
    margin-bottom: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    letter-spacing: -0.025em;
}

/* Grid Layouts */
.grid { display: grid; gap: var(--space-5); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* V1 / V2 Accents & Comparison Axis */
.text-v1 { color: var(--color-brand-v1); }
.text-v2 { color: var(--color-brand-v2); }

.v1-accent {
    border-top: 3px solid var(--color-brand-v1);
    background: linear-gradient(180deg, var(--color-brand-v1-light) 0%, transparent 100%);
}

.v2-accent {
    border-top: 3px solid var(--color-brand-v2);
    background: linear-gradient(180deg, var(--color-brand-v2-light) 0%, transparent 100%);
}

/* Mobile Responsive Axis */
.vs-badge {
    display: none;
    text-align: center;
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    letter-spacing: 2px;
    margin: var(--space-2) 0;
}

@media (max-width: 768px) {
    .grid-cols-2 { grid-template-columns: 1fr; gap: var(--space-3); }
    .grid-cols-3 { grid-template-columns: 1fr; gap: var(--space-3); }
    
    .comparison-container { display: flex; flex-direction: column; }
    .vs-badge { display: block; }
}

/* Metrics & KPIs */
.metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.metric-value {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
}

/* Forms & Buttons */
input, select, button {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    min-height: 44px; /* Touch target minimum */
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-brand-v1), #0284c7);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(6, 182, 212, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0891b2, #0369a1);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: var(--color-error);
    color: white;
}

input[type="date"], input[type="text"], input[type="email"], select, textarea {
    background: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    outline: none;
    transition: border-color var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-brand-v1);
    box-shadow: 0 0 0 2px var(--color-brand-v1-light);
}


.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Utilities */
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.p-4 { padding: var(--space-4); }
