:root {
    --sidebar-width: 220px;
}

body {
    background-color: #0a0e17;
    color: #e0e0e0;
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: #111827;
    border-right: 1px solid #1e293b;
    position: sticky;
    top: 0;
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.2rem;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background-color: #1e293b;
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

.main-content {
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    .main-content {
        padding-top: 0.5rem !important;
    }
    .card-body {
        padding: 0.75rem;
    }
    .card-header {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1.1rem; }
    h6.card-subtitle { font-size: 0.7rem; }
    .display-5 { font-size: 1.8rem; }
    .table td, .table th {
        font-size: 0.75rem;
        padding: 0.35rem 0.4rem;
        white-space: nowrap;
    }
    .btn-sm { font-size: 0.75rem; }
    .form-select-sm { font-size: 0.75rem; }
    .badge { font-size: 0.7rem; }
}

.card {
    background-color: #111827;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
}

.card-header {
    background-color: #1a2332;
    border-bottom: 1px solid #1e293b;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.table {
    color: #e0e0e0;
    margin-bottom: 0;
}

.table thead th {
    border-bottom-color: #1e293b;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    border-bottom-color: #1e293b;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #1a2332;
}

.form-control, .form-select {
    background-color: #1a2332;
    border-color: #1e293b;
    color: #e0e0e0;
}

.form-control:focus, .form-select:focus {
    background-color: #1a2332;
    border-color: #0d6efd;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.input-group-text {
    background-color: #1e293b;
    border-color: #1e293b;
    color: #94a3b8;
}

.form-check-input {
    background-color: #1e293b;
    border-color: #334155;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0e17;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

.text-success { color: #22c55e !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #eab308 !important; }

.badge {
    font-weight: 500;
}

.log-container {
    background-color: #0a0e17;
    border-radius: 0.5rem;
}

canvas {
    width: 100% !important;
    max-height: 100%;
}
