body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
}

header {
    background: #222;
    color: #fff;
    padding: 10px 16px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.25rem;
    margin: 0;
}

.menu-toggle {
    background: none;
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 4px 8px;
    cursor: pointer;
}

nav {
    display: none;
    margin-top: 10px;
}

nav.open {
    display: grid;
    gap: 8px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: .95rem;
    padding: 6px 0;
}

header h1 {
    margin: 0 0 10px;
}

nav a {
    color: #fff;
    margin-right: 18px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 6px;
}

main {
    max-width: 1050px;
    margin: 24px auto;
    padding: 0 18px;
}

.card {
    background: #fff;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.notice {
    background: #e8f5e9;
    border: 1px solid #b8dfba;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 6px;
}

.person-banner h2 {
    font-size: 1.3rem;
    margin: 0 0 5px 0;
}

.person-banner p {
    font-size: 0.85rem;
    margin: 0;
    color: #666;
}

form {
    display: grid;
    gap: 10px;
}

input, select, button {
    padding: 9px;
    font-size: 1rem;
}

button {
    cursor: pointer;
}

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

.landing-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.large-button {
    display: block;
    text-align: center;
    background: #222;
    color: #fff;
    padding: 28px;
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 6px;
}

.progress-row {
    margin-bottom: 18px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    font-weight: bold;
}

.progress-track {
    width: 100%;
    height: 30px;
    background: #e2e2e2;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    min-width: 0;
    border-radius: 15px;
    transition: width .3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    color: #111;
    font-weight: bold;
    font-size: .85rem;
}

.progress-fill span {
    padding: 0 10px;
    text-shadow: 0 1px 1px rgba(255,255,255,.45);
}

.progress-none {
    background: linear-gradient(90deg, #cccccc, #eeeeee);
}

.progress-gray {
    background: linear-gradient(90deg, #666666, #bdbdbd);
    color: #fff;
}

.progress-yellow {
    background: linear-gradient(90deg, #bdbdbd, #f2d53c);
}

.progress-green {
    background: linear-gradient(90deg, #f2d53c, #34c759);
}

.progress-orange {
    background: linear-gradient(90deg, #34c759, #ff9500);
}

.progress-red {
    background: linear-gradient(90deg, #ff9500, #ff3b30);
    color: #fff;
}

.progress-red span,
.progress-gray span {
    text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.add-button {
    appearance: none;
    -webkit-appearance: none;
    background-color: #007bff !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
}

.delete-button {
    appearance: none;
    -webkit-appearance: none;
    background-color: #b00020 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 6px 10px !important;
    cursor: pointer;
}
.weekly-summary {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.weekly-summary th {
    text-align: right;
    font-size: .85rem;
    color: #666;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}

.weekly-summary th:first-child {
    text-align: left;
}

.weekly-summary td {
    padding: 6px 4px;
    border: none;
    font-variant-numeric: tabular-nums;
}

.weekly-summary td:first-child {
    text-align: left;
    width: 35%;
}

.weekly-summary td:not(:first-child) {
    text-align: right;
}
.on-target {
    color: green;
    font-weight: bold;
}

.off-target {
    color: orange;
    font-weight: bold;
}
.food-table {
    width: 100%;
    table-layout: auto;
}

.food-table th,
.food-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.food-table td:first-child {
    width: 100%;
}

.food-table td:not(:first-child) {
    width: 1%;
}
.macro-input {
    width: 60px;
    text-align: right;
}

.small-button {
    font-size: .8rem;
    padding: 4px 8px;
    margin-right: 6px;
}

.small-button:last-child {
    margin-right: 0;
}

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

@media (max-width: 750px) {
    .grid,
    .landing-buttons {
        grid-template-columns: 1fr;
    }

    table {
        font-size: .9rem;
    }

    .progress-label {
        display: block;
    }
    .inline-form {
    display: inline;
  }
}

