/* --- 1. Custom Color Palette & Bootstrap Variable Overrides --- */
:root {
    /* Define our custom colors */
    --custom-bg: #121212;
    --custom-surface: #1E1E1E;
    --custom-primary: #3498db;
    --custom-primary-hover: #2980b9;
    --custom-text: #E0E0E0;
    --custom-text-muted: #888;
    --custom-border: #333;
    --custom-font: 'Poppins', sans-serif;
    --custom-dark: #222222;

    /* Override Bootstrap's root variables */
    --bs-body-bg: var(--custom-bg);
    --bs-body-color: var(--custom-text);
    --bs-primary: var(--custom-primary);
    --bs-primary-rgb: 52, 152, 219; /* Required for Bootstrap to generate shades */
    --bs-border-color: var(--custom-border);
    --bs-font-sans-serif: var(--custom-font);
}

/* --- 2. Login Page Specific Styles --- */
.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-logo {
    max-width: 150px;
}

/* Custom styles for form elements to match our theme */
.form-control {
    background-color: var(--custom-dark);
    border-color: var(--custom-border);
    color: var(--custom-text);
}

.form-control:focus {
    background-color: var(--custom-dark);
    border-color: var(--custom-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
    color: var(--custom-text);
}

.form-control::placeholder {
    color: var(--custom-text-muted);
}

.input-group-text, .bg-custom-dark {
    background-color: var(--custom-dark) !important;
}

.border-custom {
    border-color: var(--custom-border) !important;
}

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

/* --- 3. Main Admin Panel Styles (for your dashboard and other pages) --- */
.sidebar {
    width: 260px;
    background-color: var(--custom-surface);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    color: var(--custom-text-muted);
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar .nav-link i {
    width: 30px; /* Aligns the text nicely */
    font-size: 1rem;
    margin-right: 0.5rem;
}

.sidebar .nav-link:hover {
    color: var(--custom-text);
    background-color: rgba(255, 255, 255, 0.05);
}

/* The active link style */
.sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--custom-primary);
    border-radius: 0.375rem; /* Corresponds to Bootstrap's 'rounded' class */
}

.main-content {
    margin-left: 260px; /* Same as sidebar width */
    padding: 2rem;
    width: calc(100% - 260px);
}