body {
    font-family: system-ui, Arial, sans-serif;
    margin: 20px;
}

nav a {
    margin-right: 14px;
    text-decoration: none;
    color: #444;
}

nav a.active {
    font-weight: bold;
    color: #000;
    border-bottom: 2px solid #000;
}

/* table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
} */

table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

th {
    background: #f6f6f6;
    text-align: left;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    box-sizing: border-box;
}


.small {
    font-size: 0.9em;
    color: #444;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Generic actions container (used on pages like "Add Food" links etc.) */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Actions table cell (stack edit/delete vertically) */
td.actions {
    vertical-align: top;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #ddd;
    border-radius: 999px;
    margin-right: 6px;
}

.kcalRow {
    margin-bottom: 6px;
}

/* Macro blocks (Totals + kcal %) */

.macroList>div {
    display: grid;
    grid-template-columns: 32px max-content;
    /* <-- IMPORTANT */
    align-items: center;
    column-gap: 10px;
}

.macroLabel {
    display: inline-block;
    width: 32px;
    font-weight: 600;
}

.macroValue {
    white-space: nowrap;
}

/* Brief cell menu list */
.briefCell {
    vertical-align: top;
}

.menuList {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menuRow {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
}

.menuName {
    font-weight: 500;
}

.menuMeta {
    color: #666;
    white-space: nowrap;
}

/* MEDIA QUERIES */

@media (max-width: 700px) {

    body {
        margin: 10px;
    }

    th,
    td {
        padding: 6px;
    }

    .row {
        grid-template-columns: 1fr;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
        padding: 6px 8px;
    }
}