:root {
    --sidebar-width: 250px;
    --primary: #0d6efd;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --border-color: #2a2a2a;
}

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

body {
    background: #0d0d0d;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.text-muted {
    color: #a0a0a0 !important;
}

h6.text-muted {
    color: #b0b0b0 !important;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

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

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.sidebar-link:hover {
    background: var(--bg-card-hover);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(13, 110, 253, 0.15);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.topbar {
    padding: 15px 30px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.content-body {
    padding: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.card-header {
    background: rgba(255, 255, 255, 0.02);
}

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

.table > :not(caption) > * > * {
    border-color: var(--border-color);
    vertical-align: middle;
}

.table-hover > tbody > tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table > thead {
    background: rgba(255, 255, 255, 0.03);
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
}

.form-control, .form-select {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    color: #e0e0e0;
}

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

.form-control::placeholder {
    color: #666;
}

.form-check-input {
    background: #333;
    border-color: #555;
}

.form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-label {
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: #0b5ed7;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline-secondary {
    color: #aaa;
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: #555;
}

.list-group-item {
    background: transparent;
    border-color: var(--border-color);
    color: #e0e0e0;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.alert {
    border-radius: 8px;
}

.modal-content {
    border-color: var(--border-color);
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-footer {
    border-top-color: var(--border-color);
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.login-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

a {
    transition: color 0.3s;
}

a:hover {
    color: var(--primary);
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-body {
        padding: 20px;
    }

    .topbar {
        padding: 12px 20px;
    }
}

@media (max-width: 576px) {
    .content-body {
        padding: 15px;
    }

    .d-flex.gap-1 {
        flex-direction: column;
    }

    .table {
        font-size: 13px;
    }
}
