/* Reset & Base */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    background-color: #f3f4f6;
    color: #333;
}

a { text-decoration: none; }

/* Layout */
.dashboard-container {
    display: block;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    left: 0;
    top: 0;
    transition: 0.3s;
    z-index: 100;
}

.sidebar .brand {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .brand span { color: #3498db; }

.sidebar .menu {
    flex: 1;
    padding: 20px 0;
}

.sidebar .menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    color: #bdc3c7;
    transition: 0.3s;
}

.sidebar .menu a:hover, .sidebar .menu a.active {
    background-color: #34495e;
    color: #fff;
    border-left: 4px solid #3498db;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    width: auto;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    background: #fff;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    padding: 8px 15px;
    border-radius: 20px;
    width: 300px;
}

.search-box i { color: #95a5a6; }

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
    font-family: inherit;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: #7f8c8d;
}

.notifications .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Content Wrapper */
.content-wrapper {
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 { margin: 0; font-size: 1.8rem; color: #2c3e50; }

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: inherit;
}

.btn-primary:hover { background: #2980b9; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
}

.stat-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.stat-card.blue .icon { background: #3498db; }
.stat-card.green .icon { background: #2ecc71; }
.stat-card.purple .icon { background: #9b59b6; }
.stat-card.orange .icon { background: #e67e22; }

.stat-card .info h3 { margin: 0; font-size: 0.9rem; color: #7f8c8d; }
.stat-card .info p { margin: 5px 0; font-size: 1.5rem; font-weight: 700; color: #2c3e50; }
.stat-card .trend { font-size: 0.8rem; font-weight: 600; }
.stat-card .trend.up { color: #2ecc71; }
.stat-card .trend.down { color: #e74c3c; }

/* Split Grid */
.grid-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.card h3 { margin-top: 0; margin-bottom: 20px; color: #2c3e50; }

/* Chart Placeholder */
.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-top: 20px;
    border-bottom: 1px solid #eee;
}

.chart-placeholder .bar {
    width: 40px;
    background: #3498db;
    border-radius: 5px 5px 0 0;
    opacity: 0.8;
    transition: 0.3s;
    position: relative;
}

.chart-placeholder .bar:hover { opacity: 1; transform: scaleY(1.05); transform-origin: bottom; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
th { color: #7f8c8d; font-weight: 600; font-size: 0.9rem; }
td { font-size: 0.95rem; color: #2c3e50; }

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.success { background: #d4edda; color: #155724; }
.badge.warning { background: #fff3cd; color: #856404; }
.badge.danger { background: #f8d7da; color: #721c24; }

/* Responsive */
@media (max-width: 992px) {
    .grid-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .topbar { padding: 0 15px; }
    .search-box { display: none; }
    .content-wrapper { padding: 15px; }
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .chart-placeholder { height: 200px; }
}