@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;700;800&display=swap');

:root {
    --bg: #0a0e17; 
    --surface: #111827; 
    --border: #1e2d45;
    --accent: #a78bfa;
    --text: #e2e8f0; 
    --muted: #94a3b8;
}

body {
    background: var(--bg); 
    color: var(--text);
    font-family: 'Space Mono', monospace; 
    min-height: 100vh;
    background-image: radial-gradient(ellipse at 20% 10%, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
}

.syne { 
    font-family: 'Syne', sans-serif; 
}

::-webkit-scrollbar { 
    width: 8px; 
}
::-webkit-scrollbar-track { 
    background: var(--bg); 
}
::-webkit-scrollbar-thumb { 
    background: var(--border); 
    border-radius: 4px; 
}

.card { 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 12px;
}

.nav-active {
    color: #a78bfa !important;
    border-bottom: 2px solid #a78bfa;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th { 
    background: #0f172a; 
    color: var(--muted); 
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: 0.1em;
    padding: 16px; 
    text-align: left; 
    border-bottom: 1px solid var(--border);
}

td { 
    padding: 16px; 
    border-bottom: 1px solid var(--border); 
    font-size: 13px; 
}

tr:hover { 
    background: rgba(30, 41, 59, 0.3); 
}

input, select {
    background: #0a0e17 !important;
    border: 1px solid var(--border) !important;
    color: white !important;
}

input::placeholder {
    color: #64748b !important;
}

select option {
    background: #111827;
    color: white;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.admin-toggle {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Insights specific styles */
#financialHealthSection,
#plStatementSection,
#netWorthSection,
#efficiencySection {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stat cards animation */
.card {
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Grade badge styles */
.grade-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grade-a-plus {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.grade-a {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.grade-b-plus {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.grade-b {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.grade-c {
    background: rgba(244, 63, 94, 0.2);
    color: #f43f5e;
}

/* Profit/Loss color classes */
.text-profit {
    color: #22c55e;
}

.text-loss {
    color: #f43f5e;
}

.text-neutral {
    color: #a78bfa;
}

/* Dashboard grid adjustments */
@media (max-width: 768px) {
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Progress bar styles */
.progress-bar {
    background: #1e293b;
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Section headers */
h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    
    header {
        margin-bottom: 2rem;
    }
    
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
