:root {
    --sidebar-width: 260px;
    --primary-color: #4f46e5;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-main: #111827;
}

[data-bs-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --border-color: #334155;
    --text-main: #f8fafc;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-card);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    margin-left: calc(var(--sidebar-width) * -1);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
}
.brand-logo a{
	text-decoration: none;
}
.brand-logo h4{
	font-size: 1.25rem;
    font-weight: 800;
	color: #000;
}
.sidebar-nav {
    list-style: none;
    padding: 1.2rem 1rem;
    margin: 0;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    border-radius: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    text-decoration: none;
    opacity: 0.8;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.45rem 1rem;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-main);
    font-size: 0.9rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

.avatar-svg {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cards */
.stat-card, .content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container {
    width: 100%;
    overflow: hidden;
}

/* Responsive Mobile Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        margin-left: 0;
    }
}