@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800;900&display=swap');

:root {
    --tfm-bg: #f4f2ec;
    --tfm-ink: #121212;
    --tfm-panel: #ffffff;
    --tfm-soft: #f8f6f0;
    --tfm-line: #ddd8cc;
    --tfm-muted: #666154;
    --tfm-gold: #f9c613;
    --tfm-gold-soft: #fff2a8;
    --tfm-green: #19745d;
    --tfm-red: #b42318;
    --tfm-black: #050505;
}

.tfm-app,
.tfm-login {
    font-family: Urbanist, sans-serif;
    color: var(--tfm-ink) !important;
    letter-spacing: 0;
}

.tfm-app *,
.tfm-login * {
    box-sizing: border-box;
}

.tfm-app {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 18px calc(110px + env(safe-area-inset-bottom));
    background: var(--tfm-bg);
}

.tfm-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 26px;
    color: #fff !important;
    background: var(--tfm-black);
    border-radius: 0 0 18px 18px;
}

.tfm-hero h1 {
    margin: 6px 0 8px;
    color: #fff !important;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.tfm-hero p {
    max-width: 610px;
    margin: 0;
    color: #ece8dc !important;
    font-size: 1rem;
    line-height: 1.55;
}

.tfm-kicker {
    display: inline-flex;
    color: var(--tfm-gold) !important;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tfm-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff !important;
    font-weight: 800;
    white-space: nowrap;
}

.tfm-user img {
    border: 2px solid var(--tfm-gold);
    border-radius: 50%;
}

.tfm-tabs {
    position: sticky;
    top: 8px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 14px 0 20px;
    padding: 7px;
    background: #111;
    border-radius: 8px;
}

.tfm-tabs button {
    min-width: 0;
    min-height: 42px;
    padding: 8px 6px;
    color: #f5f2e8 !important;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-family: Urbanist, sans-serif !Important;
    overflow-wrap: anywhere;
    font-size: 11px !important;
    text-transform: capitalize;
}

.tfm-tabs button.active,
.tfm-tabs button:hover,
.tfm-tabs button:focus {
    color: #070707 !important;
    background: var(--tfm-gold);
}

.tfm-tabs:has(button:nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tfm-panel {
    display: none;
}

.tfm-panel.active {
    display: block;
}

.tfm-section-title {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin: 24px 0 14px;
}

.tfm-section-title h2 {
    margin: 4px 0 0;
    color: var(--tfm-ink) !important;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    font-weight: 900;
    line-height: 1.08;
}

.tfm-section-title p,
.tfm-muted {
    color: var(--tfm-muted) !important;
}

.tfm-grid,
.tfm-food-grid,
.tfm-profile-summary,
.tfm-status-row {
    display: grid;
    gap: 14px;
}

.tfm-grid {
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.tfm-food-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.tfm-profile-summary,
.tfm-status-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
}

.tfm-card,
.tfm-food {
    color: var(--tfm-ink) !important;
    background: var(--tfm-panel);
    border: 1px solid var(--tfm-line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(24, 22, 16, .08);
    margin-left: 0 !important;
}

.tfm-card {
    padding: 12px;
}

.tfm-food {
    display: flex;
    flex-direction: column;
    min-height: 168px;
    padding: 16px;
}

.tfm-card h3,
.tfm-food h3 {
    margin: 10px 0 14px;
    color: var(--tfm-ink) !important;
        font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
        text-transform: capitalize;
    overflow-wrap: anywhere;
    font-family: Urbanist, sans-serif;
}

.tfm-card p,
.tfm-card li,
.tfm-card small,
.tfm-card strong,
.tfm-card span {
    color: inherit !important;
    font-size: 14px;
}

form#tfm-profile {
    margin-left: 0 !important;
}

.tfm-card ul {
    margin: 12px 0;
    padding-left: 19px;
    line-height: 1.75;
}

.tfm-pill,
.tfm-tier {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    color: #171300 !important;
    background: var(--tfm-gold-soft);
    border: 1px solid #ead05b;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .72rem;
    font-weight: 900;
}

.tfm-status-row article,
.tfm-profile-summary article {
    min-height: 92px;
}

.tfm-status-row strong,
.tfm-profile-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 1.7rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.tfm-status-row span,
.tfm-profile-summary span {
    color: var(--tfm-muted) !important;
    font-size: .82rem;
    font-weight: 800;
}

.tfm-marked-summary {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--tfm-gold-soft);
    border: 1px solid #ead05b;
    border-radius: 8px;
}

.tfm-marked-summary p {
    margin: 0;
    padding: 0;
}

.tfm-marked-summary .tfm-muted {
    margin-top: 4px;
    font-size: .82rem;
}

.tfm-status-row.tfm-meal-totals,
.tfm-status-row.tfm-place-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tfm-meal-totals article {
    padding: 16px;
    background: var(--tfm-panel);
    border: 1px solid var(--tfm-line);
    border-radius: 8px;
}

.tfm-meal-totals small {
    display: block;
    margin-top: 8px;
    color: var(--tfm-muted);
    font-size: .8rem;
}

.tfm-place-totals article {
    min-height: 76px;
    padding: 0 16px;
}

.tfm-app label {
    display: grid;
    gap: 7px;
    color: var(--tfm-ink) !important;
    font-weight: 800;
}

.tfm-app input,
.tfm-app select,
.tfm-app textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    color: var(--tfm-ink) !important;
    background: #fff;
    border: 1px solid #cfcac0;
    border-radius: 8px;
    font: 650 .96rem/1.35 Urbanist, sans-serif;
}

.tfm-app input:focus,
.tfm-app select:focus,
.tfm-app textarea:focus {
    border-color: var(--tfm-gold);
    box-shadow: 0 0 0 3px rgba(249, 198, 19, .25);
    outline: none;
    background-color: #fff !important;
}

input[type=date] {background-color: #fff !important;}

.tfm-app textarea {
    min-height: 86px;
}

#trp-floater-ls {
    display: none !important;
}
.tfm-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.tfm-profile-fields .wide {
    grid-column: 1 / -1;
}

.tfm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
    color: #070707 !important;
    background: var(--tfm-gold) !important;
    border: 1px solid var(--tfm-gold);
    border-radius: 8px;
    cursor: pointer;
    font: 900 .92rem/1.05 Urbanist, sans-serif;
    text-decoration: none !important;
    text-align: center;
}

.tfm-meal-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
    color: #fff !important;
    background: #111 !important;
    border: 1px solid #111;
    border-radius: 8px;
    cursor: pointer;
    font: 900 .92rem/1.05 Urbanist, sans-serif;
    text-align: center;
}

.tfm-button.secondary,
.tfm-availability.secondary {
    color: #fff !important;
    background: #111 !important;
    border-color: #111;
}

.tfm-availability.active {
    color: #070707 !important;
    background: var(--tfm-gold) !important;
    border-color: var(--tfm-gold) !important;
    box-shadow: 0 0 0 3px rgba(249, 198, 19, .26);
    transform: translateY(-1px);
}

.tfm-meal-choice .tfm-attendance-state {
    display: block;
    margin-top: 8px;
    color: #58706a;
    font-size: .82rem;
}

.tfm-meal-buttons button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.tfm-sticky-save {
    position: sticky;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 19;
    display: flex;
    justify-content: flex-end;
    margin: 18px 0;
}

.tfm-schedule-grid {
    display: grid;
    grid-template-columns: minmax(96px, 1.3fr) 76px 76px minmax(180px, 1fr);
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}

.tfm-schedule-grid > * {
    padding-inline: 8px;
}

.tfm-schedule-grid > .tfm-switch {
    display: block;
    width: 48px;
    min-width: 48px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    justify-self: center;
    align-self: center;
}

/* Each day occupies four grid cells; start separators with Tuesday. */
.tfm-schedule-grid > :nth-child(n + 9) {
    border-top: 1px solid #e3dfd6;
    padding-top: 12px;
}

.tfm-location-fields {
    display: grid;
    gap: 8px;
}

.tfm-location-fields label {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: .78rem;
}

.tfm-location-fields select {
    min-height: 36px;
    padding: 7px 9px;
}

.tfm-week-plan-grid {
    display: grid;
    grid-template-columns: minmax(150px, 2fr) 1fr 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.tfm-week-plan-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tfm-week-plan-head .tfm-kicker {
    display: block;
    margin-bottom: 7px;
}

.tfm-week-plan-head h3 {
    margin: 0;
}

.tfm-week-plan-head label {
    min-width: 230px;
}

.tfm-week-plan-grid > span small {
    display: block;
    margin-top: 2px;
    color: #58706a;
    font-size: .78rem;
    font-weight: 600;
}

.tfm-switch input,
.tfm-rating-pick input {
    position: absolute;
    opacity: 0;
}

.tfm-switch span {
    position: relative;
    display: block;
    width: 48px;
    height: 28px;
    background: #bebebe;
    border-radius: 999px;
}

.tfm-switch span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    content: '';
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.tfm-switch input:disabled + span {
    cursor: not-allowed;
    opacity: .45;
}

.tfm-switch input:checked + span {
    background: var(--tfm-green);
}

.tfm-switch input:checked + span::after {
    transform: translateX(20px);
}

.tfm-meal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}

.tfm-meal-choice {
    padding: 14px;
    background: var(--tfm-soft);
    border: 1px solid var(--tfm-line);
    border-radius: 8px;
}

.tfm-meal-choice > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.tfm-rating-picks {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: auto;
}

.tfm-rating-pick span {
    display: grid;
    min-height: 38px;
    place-items: center;
    padding: 6px 4px;
    color: #2f2c25 !important;
    background: #f4f2ec;
    border: 1px solid var(--tfm-line);
    border-radius: 8px;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.tfm-rating-pick input:checked + span,
.tfm-rating-pick.is-selected span {
    color: #090909 !important;
    background: var(--tfm-gold);
    border-color: var(--tfm-gold);
}

.tfm-rating-pick:first-child input:checked + span,
.tfm-rating-pick:first-child.is-selected span {
    color: #fff !important;
    background: var(--tfm-red);
    border-color: var(--tfm-red);
}

.tfm-profile-bars {
    display: grid;
    gap: 9px;
}

.tfm-profile-bars p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--tfm-line);
}

.tfm-profile-bars p:last-child {
    border-bottom: 0;
}

.tfm-chef-controls,
#tfm-menu-selects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

#tfm-suggestion {
    margin-top: 18px;
}

.tfm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tfm-admin-menu-title {
    margin-top: 28px;
}

.tfm-admin-menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.tfm-admin-menu-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tfm-admin-menu-card.is-approved {
    border-color: rgba(25, 116, 93, .36);
}

.tfm-admin-menu-card.is-draft {
    border-style: dashed;
}

.tfm-admin-menu-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.tfm-admin-menu-head h3 {
    margin-bottom: 0;
}

.tfm-admin-menu-head > strong {
    flex: none;
    padding: 6px 9px;
    color: #0f4f40 !important;
    background: #dff4ec;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tfm-admin-menu-card.is-draft .tfm-admin-menu-head > strong {
    color: #604400 !important;
    background: #fff0b8;
}

.tfm-admin-menu-card ul {
    margin-top: 0;
    margin-bottom: 0;
}

.tfm-toast {
    position: fixed;
    right: 22px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 1300;
    max-width: min(360px, calc(100vw - 28px));
    padding: 13px 18px;
    color: #fff !important;
    background: #111;
    border-left: 4px solid var(--tfm-gold);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: .2s ease;
    pointer-events: none;
}

.tfm-toast.show {
    opacity: 1;
    transform: none;
}

.tfm-toast.bad {
    background: var(--tfm-red);
    border-color: #fff;
}

.tfm-login {
    max-width: 520px;
    margin: 0 auto 28px;
    padding: 32px 24px 36px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--tfm-line);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

.tfm-login h1 {
    margin: 0 0 18px;
    color: #050505 !important;
    font-family: Urbanist, sans-serif;
    font-size: clamp(1.7rem, 5vw, 2.35rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.tfm-login p {
    margin: 0 0 28px;
    color: #333 !important;
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 700px) {
    .tfm-app {
        padding: 0 0 calc(116px + env(safe-area-inset-bottom));
    }

    .tfm-hero {
        padding: 20px 16px;
        border-radius: 0 0 16px 16px;
    }

    .tfm-hero p {
        font-size: .95rem;
    }

    .tfm-user span {
        display: none;
    }

    .tfm-tabs {
        grid-template-columns: repeat(4, minmax(74px, 1fr));
        margin-inline: 10px;
        overflow-x: auto;
    }

    .tfm-tabs:has(button:nth-child(5)) {
        grid-template-columns: repeat(5, minmax(74px, 1fr));
    }

    .tfm-tabs button {
        font-size: .76rem;
    }

    .tfm-panel {
        padding-inline: 10px;
    }

    .tfm-section-title {
        display: block;
    }

    .tfm-section-title p {
        margin-top: 6px;
    }

    .tfm-profile-fields,
    .tfm-meal-buttons,
    .tfm-chef-controls,
    #tfm-menu-selects,
    .tfm-grid,
    .tfm-food-grid {
        grid-template-columns: 1fr;
    }

    .tfm-profile-summary,
    .tfm-status-row {
        grid-template-columns: 1fr 1fr;
    }

    .tfm-card,
    .tfm-food {
        padding: 12px;
    }

    .tfm-meal-choice > div {
        grid-template-columns: 1fr;
    }

    .tfm-schedule-grid {
        grid-template-columns: minmax(74px, 1fr) 52px 52px minmax(116px, 1.2fr);
        gap: 0;
        font-size: .92rem;
    }

    .tfm-schedule-grid > * {
        padding-inline: 5px;
    }

    .tfm-location-fields label {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .tfm-week-plan-grid {
        grid-template-columns: minmax(110px, 1.4fr) 58px 58px;
        gap: 10px;
        font-size: .92rem;
    }

    .tfm-week-plan-head {
        display: block;
    }

    .tfm-week-plan-head label {
        min-width: 0;
        margin-top: 14px;
    }

    .tfm-rating-picks {
        gap: 5px;
    }

    .tfm-rating-pick span {
        min-height: 36px;
        font-size: .68rem;
    }

    .tfm-sticky-save {
        justify-content: stretch;
        bottom: calc(0px + env(safe-area-inset-bottom));
    }

    .tfm-sticky-save .tfm-button {
        width: 100%;
    }

    .tfm-login {
        margin-inline: 0;
        border-radius: 0 0 22px 22px;
    }

    .tfm-toast {
        right: 10px;
        left: 10px;
        bottom: calc(88px + env(safe-area-inset-bottom));
        max-width: none;
    }
}

@media (max-width: 360px) {
    .tfm-hero h1 {
        font-size: 1.8rem;
    }

    .tfm-tabs {
        grid-template-columns: repeat(4, minmax(68px, 1fr));
    }

    .tfm-tabs:has(button:nth-child(5)) {
        grid-template-columns: repeat(5, minmax(68px, 1fr));
    }

    .tfm-card,
    .tfm-food {
        padding: 14px;
    }
}
