:root {
    --ink: #20332b;
    --muted: #718078;
    --brand: #28775b;
    --brand-dark: #1c6047;
    --canvas: #f5f8f6;
}

body {
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
}

.app-navbar {
    background: var(--brand-dark);
}

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}

.eyebrow {
    color: var(--brand);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.summary-card {
    height: 100%;
    min-height: 112px;
    padding: 1.1rem 1.25rem;
    border: 1px solid #e7ece9;
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 .15rem .5rem rgba(32, 51, 43, .04);
}

.summary-label {
    color: var(--muted);
    font-size: .82rem;
}

.summary-value {
    margin-top: .4rem;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.card-expired .summary-value {
    color: #b42318;
}

.card-soon .summary-value {
    color: #bd6b0a;
}

.storage-label {
    width: 4.5rem;
    font-size: .85rem;
}

.storage-count {
    width: 1.5rem;
    text-align: right;
}

.storage-bar {
    background-color: var(--brand);
}

.progress {
    height: .55rem;
    background-color: #e7eeea;
}

.grocery-table {
    min-width: 640px;
    font-size: .875rem;
}

.grocery-table thead th {
    background: #f8faf9;
    color: #64736b;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.grocery-table thead th a {
    color: inherit;
    text-decoration: none;
}

.grocery-table thead th a:hover {
    color: var(--brand);
}

.grocery-table td,
.grocery-table th {
    padding: .85rem .75rem;
}

.grocery-table tbody tr[data-item-row] {
    cursor: pointer;
}

.grocery-table tbody tr[data-item-row]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.item-name-link {
    color: inherit;
    text-decoration: none;
}

.item-name-link:hover {
    color: var(--brand);
    text-decoration: underline;
}

.remarks-column {
    width: 220px;
    max-width: 220px;
}

.remarks-scroll {
    max-width: 220px;
    overflow-x: auto;
    white-space: nowrap;
}

.image-indicator {
    display: inline-flex;
    margin-left: .35rem;
    color: var(--brand);
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: .32rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-fresh {
    background: #e7f5ec;
    color: #267343;
}

.status-soon {
    background: #fff1d9;
    color: #9a5a00;
}

.status-expired {
    background: #fde8e7;
    color: #b42318;
}

.expired-row td {
    background-color: #fff9f8;
}

.deleted-row td {
    background-color: #f0f2f1;
    color: #718078;
}

.grocery-photo-link {
    display: block;
    width: 8rem;
    height: 8rem;
    overflow: hidden;
    border: 1px solid #dce5df;
    border-radius: .5rem;
    background: #f8faf9;
}

.grocery-photo-large {
    width: 158px;
    height: 158px;
}

.grocery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-wrap {
    min-height: calc(100vh - 8rem);
}

.form-control,
.form-select {
    border-color: #dce5df;
}

.role-select {
    max-width: 9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #77aa91;
    box-shadow: 0 0 0 .2rem rgba(40, 119, 91, .12);
}

@media (max-width: 575.98px) {
    main.container {
        padding-top: 1.25rem !important;
    }

    .grocery-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: .75rem;
    }

    .grocery-table th,
    .grocery-table td {
        padding: .5rem .2rem;
    }

    .grocery-table thead th {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .grocery-table th:nth-child(1),
    .grocery-table td:nth-child(1) {
        width: 33%;
    }

    .grocery-table th:nth-child(2),
    .grocery-table td:nth-child(2),
    .grocery-table th:nth-child(3),
    .grocery-table td:nth-child(3) {
        width: 14%;
    }

    .grocery-table th:nth-child(4),
    .grocery-table td:nth-child(4) {
        width: 29%;
    }

    .grocery-table th:nth-child(5),
    .grocery-table td:nth-child(5) {
        width: 10%;
    }

    .grocery-table td:first-child {
        overflow-wrap: anywhere;
    }

    .grocery-table .remarks-column {
        width: auto;
        max-width: none;
    }

    .remarks-scroll {
        max-width: 100%;
    }

    .summary-card {
        min-height: 96px;
        padding: .85rem 1rem;
    }

    .summary-value {
        font-size: 1.55rem;
    }
}
