:root {
    --bg-base: #121417;
    --bg-surface: #1a1d21;
    --bg-card: #22262b;
    --accent-allegro: #ff5a00;
    --accent-primary: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --fin-profit: #10b981;
    --fin-loss: #ef4444;
    --border-color: #2e333a;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Effect */
.glass-navbar {
    background: rgba(18, 20, 23, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1020;
}

.bg-base {
    background-color: var(--bg-base) !important;
}
.bg-surface {
    background-color: var(--bg-surface) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}
.text-success {
    color: var(--fin-profit) !important;
}
.text-danger {
    color: var(--fin-loss) !important;
}
.text-primary-accent {
    color: var(--accent-primary) !important;
}
.tracking-wider {
    letter-spacing: 0.05em;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-card {
    background: linear-gradient(145deg, var(--bg-card), #2a3036);
}

.icon-shape {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-primary-subtle {
    background-color: rgba(59, 130, 246, 0.15) !important;
}
.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.15) !important;
}
.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.15) !important;
}
.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.15) !important;
}
.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.15) !important;
}

.text-info {
    color: #06b6d4 !important;
}

/* Sidebar */
#wrapper {
    overflow-x: hidden;
}
.sidebar {
    width: 280px;
    min-height: 100vh;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    transition: margin 0.3s ease-in-out;
}

#wrapper.toggled .sidebar {
    margin-left: -280px;
}

.list-group-item {
    background-color: transparent;
    color: var(--text-muted);
    border: none;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.list-group-item i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.list-group-item.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    font-weight: 600;
}

.list-group-item.active i {
    color: var(--accent-primary);
    opacity: 1;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn-primary-accent {
    background-color: var(--accent-primary);
    color: white;
    border: none;
}
.btn-primary-accent:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-allegro {
    background-color: var(--accent-allegro);
    color: white;
    border: none;
}
.btn-allegro:hover {
    background-color: #e65100;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 90, 0, 0.3);
}

/* Tables */
.table-dark {
    --bs-table-bg: var(--bg-card);
    --bs-table-color: var(--text-main);
    --bs-table-border-color: var(--border-color);
    font-variant-numeric: tabular-nums;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom-width: 2px;
}

.table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.table-hover tbody tr:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 20, 23, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -280px;
        position: absolute;
        z-index: 1000;
    }
    #wrapper.toggled .sidebar {
        margin-left: 0;
    }
}
