:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --dark-bg: #1e1e2d;
    --light-bg: #f8f9fa;
    --sidebar-width: 250px;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: #2b2d42;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--dark-bg);
    color: white;
    padding-top: 20px;
    z-index: 1000;
}

.sidebar .brand {
    padding: 0 20px 30px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.sidebar .nav-link {
    color: #a2a3b7;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,0.05);
    color: white;
}

/* Main Content Styling */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.top-nav {
    background: white;
    padding: 15px 30px;
    margin: -30px -30px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    justify-content: flex-end;
}

/* Common Components */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

/* Improved Table Readability */
.table {
    margin-top: 1rem;
    vertical-align: middle;
}

.table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #64748b;
    border-top: none;
    padding: 15px;
}

.table td {
    padding: 18px 15px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Chart Spacing */
.dash-graph {
    margin-bottom: 2rem;
}

/* Card Improvements */
.card-body {
    padding: 25px;
}

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

/* Auth Pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1e1e2d 0%, #161621 100%);
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Dash Integration Fixes */
.dash-app-container {
    width: 100%;
    height: 100%;
    min-height: 1100px;
}

.dash-app-container .js-plotly-plot {
    width: 100% !important;
}

.dash-graph-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    min-height: 480px;
}
