/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* Header */
.header {
    height: 4vw;
    background: #ffffff;
    color: #6a707d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1vw 2vw;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.logo {
    font-weight: bold;
    font-size: 18px;

}

.logo img{
    margin-bottom: -1.3vw;
    width: 3vw;
    height: auto;
}
.subheading{
    font-size: 12px;
    font-style: italic;
    font-weight: normal;
    margin: -0.2vw 3vw;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 3vw;
}

/* Icon container */
.icon {
    position: relative;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    transition: color 0.3s ease, transform 0.2s ease;
}

/* Hover interaction */
.icon:hover {
    color: #2563eb;
    transform: scale(1.1);
}

/* Badge styling */
.badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

/* Profile */
.profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.profile img {
    width: 3vw;
    height: 3vw;
    border-radius: 50%;
}


/* Layout */
.layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 16vw;
    background: #1565c0;
    padding-top: 20px;
}

.sidebar nav a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #0d47a1;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
}

canvas {
    width: 100% !important;
    height: 200px !important;
}



/* Content */
.content {
    flex: 1;
    padding: 25px;
    background: #e3e1e1;
}

.subtitle {
    color: #555;
    margin-bottom: 20px;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card h3 {
    font-size: 14px;
    color: #666;
}

.number {
    font-size: 26px;
    font-weight: bold;
    margin-top: 10px;
}

.warning { border-left: 5px solid #f9a825; }
.info { border-left: 5px solid #1e88e5; }
.success { border-left: 5px solid #43a047; }

/* Table */
.table-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #f1f1f1;
}

.status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.status.in {
    background: #43a047;
}

.status.low {
    background: #e53935;
}

/* Buttons */
.btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-size: 12px;
}

.edit {
    background: #1e88e5;
}

.delete {
    background: #e53935;
}

.new {
    background:#1565c0;
    float: right;
    margin-top: -2.5vw;
}
.restock {
    background:#6d0863;
    
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 768px) {

    .header-right {
        gap: 14px;
    }

    .profile span {
        display: none;
    }
    .sidebar {
        display: none;
    }

    .layout {
        flex-direction: column;
    }
    

    canvas {
        height: 180px !important;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 8px;
    }

    td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
    }

    td::before {
        font-weight: bold;
        color: #555;
    }

    td:nth-child(1)::before { content: "Item"; }
    td:nth-child(2)::before { content: "Category"; }
    td:nth-child(3)::before { content: "Stock"; }
    td:nth-child(4)::before { content: "Status"; }
    td:nth-child(5)::before { content: "Actions"; }
}
