:root {
    --primary-red: #e31e24;
    --dark-red: #b01419;
    --black-bg: #000000;
    --dark-surface: #0a0a0a;
    --card-bg: #111827;
    --text-red: #e31e24;
    --text-white: #ffffff;
    --text-muted: #e2e8f0;
    --accent-glow: rgba(227, 30, 36, 0.3);
    --glass: rgba(17, 24, 39, 0.9);
}

body {
    background-color: var(--black-bg);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--dark-surface);
    border-right: 1px solid rgba(227, 30, 36, 0.1);
    height: 100vh;
    width: 280px;
    position: fixed;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(227, 30, 36, 0.2);
    border-radius: 10px;
}

.sidebar-profile small {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-light-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar .nav-link {
    color: var(--text-muted);
    padding: 0.85rem 1.5rem;
    font-weight: 500;
    margin: 0.2rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 30px;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: var(--black-bg);
    background: var(--primary-red);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

.sidebar .nav-link.active i {
    transform: scale(1.1);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--black-bg);
    min-height: 100vh;
}

@media (max-width: 1200px) {
    .main-content {
        padding: 1.5rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
    }
}

/* Premium Cards */
.card, .stat-card {
    background: var(--card-bg) !important;
    border: 1px solid rgba(227, 30, 36, 0.15) !important;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
    color: var(--text-white) !important;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(227, 30, 36, 0.3) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

.glass-card {
    background: rgba(17, 24, 39, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Stats Styling */
.stat-card {
    padding: 1.5rem;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(227, 30, 36, 0.15);
    color: var(--primary-red);
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red)) !important;
    border: none !important;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    color: #fff !important;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227, 30, 36, 0.4);
    color: #fff !important;
}

/* Forms */
.form-control, .form-select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: var(--primary-red) !important;
    box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.2) !important;
    color: #ffffff !important;
}

/* Tables */
.table {
    margin-bottom: 0;
    color: var(--text-white) !important;
}

.table thead th {
    background: rgba(0, 0, 0, 0.2) !important;
    border-bottom: 1px solid rgba(227, 30, 36, 0.1) !important;
    color: var(--primary-red) !important;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.25rem 1rem !important;
    color: var(--text-white) !important;
}

.table-responsive {
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

/* List Groups */
.list-group-item {
    background: transparent !important;
    color: var(--text-white) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

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

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Sidebar Toggle */
@media (max-width: 991.98px) {
    .sidebar { margin-left: -280px; }
    .sidebar.active { margin-left: 0; }
    .main-content { margin-left: 0; }
}

/* Dropdown Custom Styling */
.dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid rgba(227, 30, 36, 0.2) !important;
    background-color: #111827 !important;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.6) !important;
}

.dropdown-item {
    color: #e2e8f0 !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: var(--primary-red) !important;
    color: #ffffff !important;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Date/Time Picker Icon Visibility Fix */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100%) contrast(100%);
    cursor: pointer;
    opacity: 0.8;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}