* {
    box-sizing: border-box;
}

body {
    font-family: Roboto, sans-serif;
    margin: 0;
    background: #0f172a;
    color: white;
}

main {
    max-width: 900px; /* 🔥 increased width */
    margin: auto;
    padding: 15px;
}

header {
    text-align: center;
    padding: 16px;
}

.tabs {
    display: flex;
    gap: 10px;
    padding: 0 10px 10px;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #1e293b;
    color: #94a3b8;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
}

.card {
    background: #1e293b;
    padding: 20px;
    border-radius: 16px;
}

h1, h2 {
    text-align: center;
}

input, select {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border-radius: 12px;
    border: none;
    background: #0f172a;
    color: white;
}

/* SHOPPING ROW */
.row {
    display: flex;
    gap: 10px;
}

.row input {
    flex: 1;
}

.row button {
    min-width: 80px;
}

/* BUTTONS */
.primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
}

.cta {
    width: 100%;
    height: 52px;
    background: #22c55e;
    color: white;
    border: none;
    margin-top: 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 15px;
}

/* SHOPPING LIST */
#shoppingList li {
    display: flex;
    align-items: center;
    gap: 10px;
}

#shoppingList input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* ---------------------- */
/* INVENTORY LAYOUT FIXED */
/* ---------------------- */

.inventory-layout {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

/* LEFT PANEL */
.add-panel {
    width: 35%;
    min-width: 250px;
}

/* RIGHT PANEL */
.inventory-table {
    width: 65%;
}

/* INVENTORY ROW */
.inventory-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid #334155;
}

/* COLUMN STYLES */
.col {
    text-align: center;
    font-size: 14px;
}

.col.item {
    text-align: left;
    font-weight: 500;
    padding-left: 5px;
}

/* ACTION BUTTON GROUP */
.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* BUTTON STYLE */
.inventory-row button {
    background: #2563eb;
    border: none;
    color: white;
    border-radius: 50%;
    height: 38px;
    width: 38px;
    font-size: 16px;
    cursor: pointer;
}

/* HOVER EFFECT */
.inventory-row button:hover {
    background: #1d4ed8;
}

/* MOBILE RESPONSIVE */
@media (max-width: 700px) {
    main {
        max-width: 100%;
    }

    .inventory-layout {
        flex-direction: column;
    }

    .add-panel,
    .inventory-table {
        width: 100%;
    }

    .inventory-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 13px;
    }

    .inventory-row button {
        height: 34px;
        width: 34px;
    }
}