:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;
    --accent-cyan: #22d3ee;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Effects */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Header */
header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.title {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.card-header i {
    width: 18px;
    height: 18px;
}

/* Metrics */
.metric-large {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-mono);
}

.metric-medium {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.metric-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-detail {
    font-size: 0.9rem;
    color: var(--accent-gold);
    font-weight: 600;
}

.text-gold {
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.text-red {
    color: var(--accent-red);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.text-cyan {
    color: var(--accent-cyan);
}

/* Visualizations */
.bar-container {
    margin-top: 0.5rem;
}

.bar-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--text-secondary);
    border-radius: 3px;
}

.bar-warn {
    background: var(--accent-gold);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Flow Viz */
.flow-viz {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.flow-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 1rem;
    position: relative;
}

.flow-particle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--accent-gold);
    animation: flowAnim 2s linear infinite;
}

@keyframes flowAnim {
    0% {
        left: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Donut Chart */
.donut-chart {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.circular-chart.red .circle {
    stroke: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

.percentage {
    fill: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.5em;
    text-anchor: middle;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

/* Range Viz */
.range-viz {
    margin-top: 1rem;
}

.range-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    margin-bottom: 0.5rem;
}

.range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--accent-red);
    border-radius: 4px;
    opacity: 0.8;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

@media (min-width: 1024px) {
    .financial-card {
        grid-column: span 1;
    }

    .volume-card {
        grid-column: span 1;
    }

    .flow-card {
        grid-column: span 1;
    }
}