/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=JetBrains+Mono:wght@100..800&display=swap');

/* Theme Variables */
:root {
    /* Kalpa Color Palette - based on primary brand color #00599a */
    --kalpa-50: #f0f6fc;
    --kalpa-100: #e1edf9;
    --kalpa-200: #b8d6f0;
    --kalpa-300: #8fbde7;
    --kalpa-400: #4d94d3;
    --kalpa-500: #0076bf;
    --kalpa-600: #00599a;    /* Primary brand color */
    --kalpa-700: #004a85;
    --kalpa-800: #003b70;
    --kalpa-900: #002c5c;

    /* Brand Colors */
    --primary: var(--kalpa-600);
    --primary-hover: var(--kalpa-700);
    --secondary: #00CC99;
    --accent: #FF3366;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    
    /* UI Colors */
    --background: hsl(210, 40%, 98%);
    --foreground: hsl(222, 47%, 11%);
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--kalpa-600)
}

.text-primary {
    color: var(--kalpa-600) !important;
}

.bg-primary {
    background-color: var(--kalpa-600) !important;
}

/* Header & Navigation */
.site-header {
    padding: 0.75rem 0;
    background-color: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 0.5rem 0;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary);
}

.brand-text {
    background: linear-gradient(90deg, var(--kalpa-600), var(--kalpa-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--foreground);
}

.nav-link.active {
    color: var(--primary);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary);
}

#broker-selector select {
    min-width: 150px;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border-color: var(--border-color);
    font-size: 0.9rem;
}

/* Hero Section */
.hero-section {
    padding: 3rem 0;
}

.hero-section h1 {
    font-weight: 700;
    line-height: 1.2;
}

.hero-section .lead {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

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

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

.btn-outline-secondary {
    color: var(--foreground);
    border-color: var(--border-color);
}

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

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    color: white;
    background-color: var(--primary);
}

/* Cards */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.dashboard-card {
    transition: all 0.2s ease;
}

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

.card-header {
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Portfolio Stats */
.stats-container {
    background-color: var(--background);
    border-radius: 10px;
}

.stats-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.stats-value {
    font-weight: 600;
    color: var(--foreground);
}

/* Broker Tags */
.broker-tag {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin: 2rem 0;
}

.section-title {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.feature-card {
    background-color: #fff;
    transition: all 0.2s ease;
}

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

.icon-container {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
}

.icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background-color: var(--kalpa-50);
  color: var(--kalpa-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 500;
    color: var(--text-muted);
    border-top: none;
    border-bottom: 1px solid var(--border-color);
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
}

/* Recommendation Cards */
.recommendation-card {
    transition: all 0.2s ease;
}

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

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--text-muted);
}

.footer a:hover {
    color: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Loading Spinners */
.spinner-border {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

/* Settings Page */
.broker-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.broker-card.active {
    border: 2px solid var(--primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stats-container {
        margin-top: 1.5rem;
    }
}

/* Kalpa Color Classes */
.bg-kalpa-50 { background-color: var(--kalpa-50); }
.bg-kalpa-100 { background-color: var(--kalpa-100); }
.bg-kalpa-600 { background-color: var(--kalpa-600); }
.bg-kalpa-700 { background-color: var(--kalpa-700); }

.text-kalpa-600 { color: var(--kalpa-600); }
.text-kalpa-700 { color: var(--kalpa-700); }
.text-kalpa-800 { color: var(--kalpa-800); }
.text-kalpa-900 { color: var(--kalpa-900); }

.hover\:bg-kalpa-700:hover { background-color: var(--kalpa-700); }
.hover\:text-kalpa-600:hover { color: var(--kalpa-600); }

/* Kalpa Color Utilities */
.text-kalpa-50 { color: var(--kalpa-50); }
.text-kalpa-100 { color: var(--kalpa-100); }
.text-kalpa-200 { color: var(--kalpa-200); }
.text-kalpa-300 { color: var(--kalpa-300); }
.text-kalpa-400 { color: var(--kalpa-400); }
.text-kalpa-500 { color: var(--kalpa-500); }
.text-kalpa-600 { color: var(--kalpa-600); }
.text-kalpa-700 { color: var(--kalpa-700); }
.text-kalpa-800 { color: var(--kalpa-800); }
.text-kalpa-900 { color: var(--kalpa-900); }

.bg-kalpa-50 { background-color: var(--kalpa-50); }
.bg-kalpa-100 { background-color: var(--kalpa-100); }
.bg-kalpa-200 { background-color: var(--kalpa-200); }
.bg-kalpa-300 { background-color: var(--kalpa-300); }
.bg-kalpa-400 { background-color: var(--kalpa-400); }
.bg-kalpa-500 { background-color: var(--kalpa-500); }
.bg-kalpa-600 { background-color: var(--kalpa-600); }
.bg-kalpa-700 { background-color: var(--kalpa-700); }
.bg-kalpa-800 { background-color: var(--kalpa-800); }
.bg-kalpa-900 { background-color: var(--kalpa-900); }

.hover\:text-kalpa-600:hover { color: var(--kalpa-600); }
.hover\:bg-kalpa-600:hover { background-color: var(--kalpa-600); }
.hover\:border-kalpa-600:hover { border-color: var(--kalpa-600); }

/* Effects and Animations */
.heading-gradient {
    background-image: linear-gradient(to right, var(--kalpa-600), var(--kalpa-500));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.pattern-grid {
    background-size: 30px 30px;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
}

/* Transitions */
.transition-all { transition: all 0.3s ease; }
.transform { transform-origin: center; }
.hover\:scale-105:hover { transform: scale(1.05); }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background-color: var(--background); }
::-webkit-scrollbar-thumb { 
    background-color: var(--kalpa-200);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--kalpa-300); }

/* Utils */
.text-balance { text-wrap: balance; }

.glass {
    background-color: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.glass-strong {
    background-color: rgba(255,255,255,0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}