/* Mengatur font dan reset dasar */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #4361ee;
    --sidebar-bg: #ffffff;
    --bg-color: #f4f7fe;
    --text-dark: #2b3674;
    --text-gray: #a3aed1;
    --white: #ffffff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
}

/* Layout Utama */
.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-logo h2 {
    color: var(--primary-color);
    font-size: 24px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-menu li {
    padding: 10px 20px;
}

.sidebar-menu li a {
    text-decoration: none;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.sidebar-menu li a.logout {
    color: #e63946;
}

.sidebar-menu li a.logout:hover {
    background-color: #ffe3e6;
}

/* Wrapper Konten Utama */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Header */
.header {
    background-color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    padding: 10px 20px;
    border-radius: 20px;
    width: 300px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
    color: var(--text-dark);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    font-size: 20px;
    color: var(--text-gray);
    cursor: pointer;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-profile span {
    font-weight: 600;
}

/* Konten Main */
.content {
    padding: 30px;
}

.content-header h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Kartu Statistik */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-info h3 {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.card-info p {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.card-icon.income { background-color: #e5ecff; color: #4361ee; }
.card-icon.users { background-color: #e3f5ff; color: #00a5ff; }
.card-icon.orders { background-color: #ffece5; color: #ff764c; }
.card-icon.visits { background-color: #e5fdf4; color: #00c987; }

/* Tabel */
.recent-orders {
    background-color: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.recent-orders h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    color: var(--text-gray);
    font-weight: 500;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status.completed { background-color: #e5fdf4; color: #00c987; }
.status.pending { background-color: #fff4e5; color: #ffb800; }
.status.processing { background-color: #e5ecff; color: #4361ee; }

/* Responsivitas untuk layar kecil */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
    }
    
    .sidebar-menu {
        display: none; /* Sembunyikan menu di mobile (biasanya butuh tombol hamburger/JS) */
    }
    
    .search-bar {
        width: 200px;
    }
}