/* =====================================================
   JOELSTORE DASHBOARD CSS
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #333;
}

/* =====================================================
   LAYOUT
===================================================== */

.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    width: 260px;
    background: #1f2937;
    color: #fff;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-header h2 {
    font-size: 22px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.sidebar-menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 14px 20px;
    transition: .3s;
}

.sidebar-menu li a:hover {
    background: #374151;
}

.sidebar-menu li.active a {
    background: #2563eb;
}

/* =====================================================
   CONTENT AREA
===================================================== */

.content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 20px;
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-title {
    font-size: 20px;
    font-weight: bold;
}

/* =====================================================
   CARDS
===================================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.card h3 {
    margin-bottom: 10px;
}

.card-value {
    font-size: 28px;
    font-weight: bold;
}

/* =====================================================
   TABLE
===================================================== */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th,
table td {
    padding: 12px;
    border: 1px solid #ddd;
}

table th {
    background: #2563eb;
    color: white;
}

table tr:nth-child(even) {
    background: #1f2937;
}

/* =====================================================
   FORM
===================================================== */

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

textarea.form-control {
    resize: vertical;
}

/* =====================================================
   BUTTON
===================================================== */

.btn {
    display: inline-block;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

/* =====================================================
   ALERT
===================================================== */

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

/* =====================================================
   BADGE
===================================================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-success {
    background: #16a34a;
    color: #fff;
}

.badge-warning {
    background: #f59e0b;
    color: #fff;
}

.badge-danger {
    background: #dc2626;
    color: #fff;
}

/* =====================================================
   PROFILE CARD
===================================================== */

.profile-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.profile-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

/* =====================================================
   MOBILE MENU BUTTON
===================================================== */

.menu-toggle {
    display: none;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {

    .sidebar {
        left: -260px;
        transition: .3s;
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }

    .content {
        margin-left: 0;
        width: 100%;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        background: #2563eb;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }
}