:root {
    --primary-bg: #F3E0D3;
    --dark-bg: #1F1F1F;
    --accent-color: #DFA878;
    --card-bg: #EACFB6;
    --text-dark: #1F1F1F;
    --text-light: #F3E0D3;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* --- Sidebar --- */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--dark-bg);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar ul li a {
    padding: 15px 20px;
    font-size: 1rem;
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: var(--accent-color);
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--accent-color);
}

#sidebar ul li a i {
    width: 20px;
    text-align: center;
}

/* --- Content --- */
#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

.admin-navbar {
    padding: 15px;
    background: #fff;
    border: none;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-toggle {
    background: var(--dark-bg);
    color: white;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- Analytics Cards --- */
.analytics-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.analytics-card h5 {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.analytics-card h2 {
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: 5px;
}

.trend-badge {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
}

.trend-up { background: #d4edda; color: #155724; }
.trend-down { background: #f8d7da; color: #721c24; }

/* --- Charts Container --- */
.chart-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-weight: 700;
    margin: 0;
    color: var(--dark-bg);
}

.form-select-sm {
    border-radius: 15px;
    border: 1px solid #eee;
}

/* --- Top Products List --- */
.top-product-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.top-product-item:last-child {
    border-bottom: none;
}

.product-rank {
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    color: #888;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
}

.product-info {
    flex-grow: 1;
}

.progress {
    height: 6px;
    border-radius: 10px;
    background-color: #f0f0f0;
    margin-top: 5px;
}

.brand-logo {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    text-decoration: none;
}

@media (max-width: 768px) {
    #sidebar { margin-left: -250px; }
    #sidebar.active { margin-left: 0; }
}
