:root {
    --sidebar-bg: #1a1a2e;
    --sidebar-fg: #ffffff;
    --aaron-pink: #C16D8A;
    --aaron-indigo: #2a1a4e;

    /* Bootstrap Overrides */
    --bs-body-bg: #16213e;
    --bs-body-color: rgba(255, 255, 255, 0.85);
    --bs-primary: #C16D8A;
    --bs-primary-rgb: 193, 109, 138;
    --bs-border-color: rgba(255, 255, 255, 0.15);
    --bs-link-color: #C16D8A;
    --bs-link-hover-color: #d88fa7;
    --bs-secondary: #646cff;

    font-family: 'Lekton', monospace;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: 'Lekton', monospace;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    color: #ffffff;
    font-weight: 700;
}

.text-secondary {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-dark {
    color: #ffffff !important;
}

/* Dark Mode UI Components */
.card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(10px);
}

.card-stat {
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: rgba(255, 255, 255, 0.85);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-striped-color: rgba(255, 255, 255, 0.85);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-color: #fff;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: #a35671;
    border-color: #a35671;
    color: #fff;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: #fff;
}

/* List Groups */
.list-group-item {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.list-group-item:hover,
.list-group-item:focus {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Forms */
.form-control,
.form-select {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--bs-primary);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(193, 109, 138, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Core Layout Grids */
.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    transition: grid-template-columns 0.3s ease-in-out;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 76px 1fr;
}

.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.app-shell.sidebar-collapsed .sidebar-text,
.app-shell.sidebar-collapsed .brand-title,
.app-shell.sidebar-collapsed .user-info {
    display: none;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.app-shell.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 10px 0;
}

.app-shell.sidebar-collapsed .sidebar-link i {
    margin-right: 0 !important;
    font-size: 1.25rem;
}

.app-shell.sidebar-collapsed .logout-btn-text {
    display: none;
}

.app-shell.sidebar-collapsed .btn-logout {
    padding-left: 0;
    padding-right: 0;
}

.app-shell.sidebar-collapsed .btn-logout i {
    margin-right: 0 !important;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.main {
    min-width: 0;
}

.brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--aaron-pink);
    box-shadow: 0 0 0 6px rgba(193, 109, 138, 0.15);
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: relative;
    }
}