/* ============================================
   InvestPro - Premium Aesthetic Design
   Modern Fintech • Clean • Sophisticated
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Color Palette */
    --bg-primary: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-soft: #F1F5F9;
    --bg-muted: #E2E8F0;
    
    /* Dark mode */
    --dark-bg: #0F172A;
    --dark-card: #1E293B;
    --dark-soft: #334155;
    
    /* Brand Colors */
    --brand-primary: #6366F1;
    --brand-secondary: #8B5CF6;
    --brand-accent: #06B6D4;
    
    /* Semantic Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    
    /* Neutral Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;
    --border-light: #E2E8F0;
    --border-medium: #CBD5E1;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    --gradient-cool: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
    --gradient-pink: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
    --gradient-dark: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --shadow-2xl: 0 25px 50px rgba(0,0,0,0.12);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Manrope', sans-serif;
    
    /* Container */
    --container-width: 420px;
    --content-padding: 20px;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
    max-width: var(--container-width);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-white);
    position: relative;
    box-shadow: var(--shadow-2xl);
}

@media (min-width: 768px) {
    body {
        background: #E2E8F0;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 20px;
    }
    .app-container {
        border-radius: var(--radius-2xl);
        overflow: hidden;
        min-height: calc(100vh - 40px);
    }
}

/* Typography */
h1 { font-family: var(--font-heading); font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; }
h3 { font-family: var(--font-heading); font-size: 20px; font-weight: 700; }
h4 { font-family: var(--font-heading); font-size: 18px; font-weight: 600; }
h5 { font-family: var(--font-heading); font-size: 16px; font-weight: 600; }
h6 { font-family: var(--font-heading); font-size: 14px; font-weight: 600; }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card-premium {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card-premium:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-elevated {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.card-gradient {
    color: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.card-gradient-purple { background: var(--gradient-primary); }
.card-gradient-green { background: var(--gradient-success); }
.card-gradient-blue { background: var(--gradient-cool); }
.card-gradient-warm { background: var(--gradient-warm); }

.card-gradient::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

/* Buttons */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    letter-spacing: -0.2px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(99,102,241,0.4);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.btn-outline {
    background: white;
    border: 2px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: var(--bg-soft);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}

/* Inputs */
.input-premium {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-soft);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s;
    outline: none;
}

.input-premium:focus {
    border-color: var(--brand-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

.input-premium::placeholder { color: var(--text-muted); }

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.input-with-icon .input-premium {
    padding-left: 48px;
}

/* Badges */
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.badge-primary { background: #EEF2FF; color: #4338CA; }
.badge-success { background: var(--success-light); color: #059669; }
.badge-warning { background: var(--warning-light); color: #D97706; }
.badge-danger { background: var(--danger-light); color: #DC2626; }
.badge-info { background: var(--info-light); color: #2563EB; }

/* Stats */
.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Navigation */
.top-nav {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 12px var(--content-padding);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-width);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    padding: 8px 0 20px;
    z-index: 100;
    display: flex;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    transition: all 0.3s;
}

.nav-item i { font-size: 22px; margin-bottom: 4px; }

.nav-item.active {
    color: var(--brand-primary);
    background: #EEF2FF;
}

/* Avatar */
.avatar {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.avatar-lg {
    width: 60px; height: 60px;
    font-size: 24px;
}

/* Lists */
.list-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 14px;
}

.list-item:last-child { border-bottom: none; }

.list-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.list-content { flex: 1; }
.list-title { font-weight: 600; font-size: 14px; }
.list-subtitle { font-size: 12px; color: var(--text-muted); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }

/* Spacing */
.p-0 { padding: 0; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-up { animation: fadeUp 0.5s ease forwards; }
.animate-scale-in { animation: scaleIn 0.3s ease forwards; }
.animate-slide-right { animation: slideRight 0.4s ease forwards; }

/* Stagger children */
.stagger > * { opacity: 0; animation: fadeUp 0.5s ease forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Progress Bar */
.progress-premium {
    height: 6px;
    background: var(--bg-soft);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill-success { background: var(--gradient-success); }
.progress-fill-warm { background: var(--gradient-warm); }

/* Chip */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
}