* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f5f6fa;
    min-height: 100vh;
}

/* HEADER */
.header {
    background: white;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 997;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

#toggleSidebar {
    font-size: 18px;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.3s;
}

#toggleSidebar:hover {
    color: #3498db;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.fa-bell {
    font-size: 18px;
    color: #7f8c8d;
    cursor: pointer;
    position: relative;
}

.fa-bell:hover {
    color: #3498db;
}

.profile {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
}

.profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* SIDEBAR */
.sidebar {
    background: white;
    width: 250px;
    height: calc(100vh - 60px);
    position: fixed;
    top: 60px;
    left: 0;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    transition: left 0.3s ease;
    z-index: 996;
}

.sidebar ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar li {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #555;
    font-size: 14px;
    transition: all 0.3s;
}

.sidebar li:hover {
    background: #f8f9fa;
    color: #3498db;
}

.sidebar li.active {
    background: #e3f2fd;
    color: #3498db;
    border-left: 3px solid #3498db;
}

.sidebar li.menu-title {
    color: #95a5a6;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
    padding: 10px 25px;
    cursor: default;
}

.sidebar li.menu-title:hover {
    background: transparent;
    color: #95a5a6;
}

/* MAIN CONTENT */
.main {
    margin-left: 250px;
    margin-top: 60px;
    padding: 20px;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

/* KPI CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 4px solid;
}

.card.blue {
    border-color: #3498db;
}

.card.orange {
    border-color: #f39c12;
}

.card.red {
    border-color: #e74c3c;
}

.card.green {
    border-color: #2ecc71;
}

.card h3 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.card p {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

/* PANELS */
.panel {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.panel h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #555;
}

th {
    font-weight: 600;
    color: #2c3e50;
}

/* BUTTONS */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn.done {
    background: #2ecc71;
    color: white;
}

.btn.done:hover {
    background: #27ae60;
}

.btn.call {
    background: #3498db;
    color: white;
}

.btn.call:hover {
    background: #2980b9;
}

.btn.whatsapp {
    background: #25D366;
    color: white;
}

.btn.whatsapp:hover {
    background: #1da851;
}

/* RESPONSIVE ENHANCEMENTS */

/* For tablets */
@media (max-width: 1024px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For mobile devices */
@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }
    
    .header-right {
        gap: 15px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    #toggleSidebar,
    .fa-bell {
        font-size: 18px;
    }
    
    .profile {
        width: 34px;
        height: 34px;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
    
    .card p {
        font-size: 24px;
    }
    
    .panel {
        padding: 15px;
        margin-top: 20px;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    th, td {
        padding: 12px 10px;
    }
    
    .btn {
        padding: 5px 10px;
        font-size: 14px;
        margin: 2px;
    }
    
    /* Sidebar responsive */
    .sidebar {
        width: 250px;
        left: -250px;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main {
        margin-left: 0;
        padding: 70px 15px 20px;
    }
    
    /* Overlay when sidebar is open */
    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 995;
    }
}

/* For very small phones */
@media (max-width: 480px) {
    .header {
        height: 55px;
        padding: 0 12px;
    }
    
    .header-right {
        gap: 12px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .profile {
        width: 32px;
        height: 32px;
    }
    
    .main {
        padding: 65px 12px 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card h3 {
        font-size: 13px;
    }
    
    .card p {
        font-size: 22px;
    }
    
    .panel h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .sidebar {
        width: 230px;
        left: -230px;
    }
}