:root {
    --tf-primary: #E63946;
    --tf-primary-dark: #b71c2b;
    --tf-secondary: #1D3557;
    --tf-bg: #FFF8F2;
    --tf-surface: #FFFFFF;
    --tf-ink: #1A1A1A;
    --tf-muted: #6B7280;
    --tf-line: #ECE3DA;
    --tf-success: #16A34A;
    --tf-radius: 22px;
    --tf-shadow: 0 12px 32px rgba(29, 53, 87, 0.12);
    --tf-shadow-lg: 0 24px 60px rgba(29, 53, 87, 0.18);
    --tf-font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --tf-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: var(--tf-font);
    background: var(--tf-bg);
    color: var(--tf-ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, .tf-display { font-family: var(--tf-display); letter-spacing: -0.02em; }

/* ---------- Boot / loader ---------- */
.tf-boot { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; gap: 20px; color: var(--tf-muted); }
.tf-boot__spinner { width: 56px; height: 56px; border: 6px solid var(--tf-line); border-top-color: var(--tf-primary); border-radius: 50%; animation: tf-spin 0.9s linear infinite; }
@keyframes tf-spin { to { transform: rotate(360deg); } }

/* ---------- Layout base ---------- */
.tf-shell { min-height: 100vh; display: flex; flex-direction: column; }
.tf-page { flex: 1; display: flex; flex-direction: column; animation: tf-fade 0.4s ease both; }
@keyframes tf-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.tf-topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 16px;
    padding: 18px 28px; background: var(--tf-surface);
    border-bottom: 1px solid var(--tf-line); box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.tf-topbar__logo { width: 52px; height: 52px; border-radius: 14px; background: var(--tf-primary); color: #fff; display: grid; place-items: center; font-family: var(--tf-display); font-weight: 800; font-size: 24px; }
.tf-topbar__title { font-family: var(--tf-display); font-weight: 800; font-size: 26px; }
.tf-topbar__sub { color: var(--tf-muted); font-size: 15px; }
.tf-topbar__spacer { flex: 1; }

/* ---------- Botões ---------- */
.tf-btn {
    font-family: var(--tf-font); font-weight: 700; font-size: 20px;
    border: none; border-radius: 999px; cursor: pointer;
    padding: 20px 34px; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    user-select: none;
}
.tf-btn:active { transform: scale(0.96); }
.tf-btn--primary { background: var(--tf-primary); color: #fff; box-shadow: 0 10px 24px rgba(230, 57, 70, 0.35); }
.tf-btn--primary:hover { background: var(--tf-primary-dark); }
.tf-btn--secondary { background: var(--tf-surface); color: var(--tf-secondary); border: 2px solid var(--tf-line); }
.tf-btn--ghost { background: transparent; color: var(--tf-secondary); }
.tf-btn--danger { background: #FEE2E2; color: #B91C1C; }
.tf-btn--block { width: 100%; }
.tf-btn--xl { font-size: 26px; padding: 26px 48px; }
.tf-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Welcome ---------- */
.tf-welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; position: relative; overflow: hidden; }
.tf-welcome__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.14; filter: saturate(1.2); }
.tf-welcome__logo { width: 130px; height: 130px; border-radius: 34px; background: var(--tf-primary); color: #fff; display: grid; place-items: center; font-family: var(--tf-display); font-weight: 800; font-size: 60px; box-shadow: var(--tf-shadow-lg); margin-bottom: 28px; z-index: 1; }
.tf-welcome__logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.tf-welcome h1 { font-size: clamp(48px, 8vw, 88px); z-index: 1; }
.tf-welcome__brand { color: var(--tf-primary); font-size: clamp(24px, 4vw, 40px); font-weight: 800; z-index: 1; margin-bottom: 8px; font-family: var(--tf-display); }
.tf-welcome p { font-size: clamp(20px, 3vw, 30px); color: var(--tf-muted); margin: 18px 0 46px; max-width: 640px; z-index: 1; }
.tf-welcome .tf-btn { z-index: 1; animation: tf-pulse 2.4s ease-in-out infinite; }
@keyframes tf-pulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Menu / categorias ---------- */
.tf-menu { display: flex; flex-direction: column; }
.tf-cats { display: flex; gap: 14px; padding: 20px 28px; overflow-x: auto; background: var(--tf-surface); border-bottom: 1px solid var(--tf-line); }
.tf-cat {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 26px; border-radius: 20px; border: 2px solid var(--tf-line); background: var(--tf-surface);
    cursor: pointer; transition: all 0.18s ease; min-width: 120px;
}
.tf-cat__icon { font-size: 34px; }
.tf-cat__name { font-weight: 700; font-size: 17px; }
.tf-cat--active { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); box-shadow: 0 8px 20px rgba(230,57,70,0.3); }
.tf-cat--active .tf-cat__name { color: #fff; }
.tf-cat:active { transform: scale(0.95); }

.tf-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; padding: 26px 28px 160px; }

/* ---------- Product card ---------- */
.tf-card {
    background: var(--tf-surface); border-radius: var(--tf-radius); overflow: hidden;
    box-shadow: var(--tf-shadow); display: flex; flex-direction: column; cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease; border: 1px solid var(--tf-line);
}
.tf-card:hover { transform: translateY(-6px); box-shadow: var(--tf-shadow-lg); }
.tf-card:active { transform: scale(0.98); }
.tf-card__img { width: 100%; height: 190px; object-fit: cover; background: #f3ede6; }
.tf-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tf-card__name { font-family: var(--tf-display); font-weight: 800; font-size: 24px; }
.tf-card__desc { color: var(--tf-muted); font-size: 15px; line-height: 1.4; flex: 1; }
.tf-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tf-card__price { font-family: var(--tf-display); font-weight: 800; font-size: 26px; color: var(--tf-primary); }
.tf-card__badge { position: absolute; top: 14px; left: 14px; background: var(--tf-secondary); color: #fff; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.tf-card__unavailable { position: absolute; inset: 0; background: rgba(255,255,255,0.7); display: grid; place-items: center; font-weight: 800; color: var(--tf-primary); }
.tf-card__imgwrap { position: relative; }
.tf-add-mini { background: var(--tf-primary); color: #fff; border: none; border-radius: 14px; width: 52px; height: 52px; font-size: 28px; cursor: pointer; display: grid; place-items: center; transition: transform 0.12s; }
.tf-add-mini:active { transform: scale(0.9); }

/* ---------- Floating cart bar ---------- */
.tf-cartbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; gap: 18px;
    padding: 18px 28px; background: var(--tf-secondary); color: #fff;
    box-shadow: 0 -12px 32px rgba(0,0,0,0.18);
}
.tf-cartbar__count { background: var(--tf-primary); border-radius: 14px; padding: 10px 18px; font-weight: 800; font-size: 22px; }
.tf-cartbar__total { font-family: var(--tf-display); font-weight: 800; font-size: 26px; }
.tf-cartbar__label { opacity: 0.8; font-size: 15px; }
.tf-cartbar__spacer { flex: 1; }

/* ---------- Modal / customizer ---------- */
.tf-modal-overlay { position: fixed; inset: 0; background: rgba(20,20,30,0.5); backdrop-filter: blur(6px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: tf-fade 0.25s ease; }
.tf-modal { background: var(--tf-surface); width: min(760px, 100%); max-height: 94vh; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: tf-slideup 0.3s cubic-bezier(0.2,0.8,0.2,1); }
@keyframes tf-slideup { from { transform: translateY(100%); } to { transform: none; } }
.tf-modal__hero { position: relative; height: 220px; background-size: cover; background-position: center; }
.tf-modal__close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,0.92); font-size: 24px; cursor: pointer; }
.tf-modal__head { padding: 22px 26px 8px; }
.tf-modal__title { font-family: var(--tf-display); font-weight: 800; font-size: 30px; }
.tf-modal__desc { color: var(--tf-muted); font-size: 16px; margin-top: 6px; }
.tf-modal__body { padding: 8px 26px 20px; overflow-y: auto; flex: 1; }
.tf-modal__foot { padding: 18px 26px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--tf-line); display: flex; align-items: center; gap: 16px; background: var(--tf-surface); }

.tf-group { margin: 18px 0; }
.tf-group__title { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.tf-group__hint { font-size: 14px; color: var(--tf-muted); font-weight: 500; }
.tf-group__req { background: var(--tf-primary); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.tf-opt {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
    border: 2px solid var(--tf-line); margin-top: 10px; cursor: pointer; transition: all 0.15s ease;
}
.tf-opt--selected { border-color: var(--tf-primary); background: #FFF1F2; }
.tf-opt__check { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--tf-line); display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.tf-opt--selected .tf-opt__check { background: var(--tf-primary); border-color: var(--tf-primary); }
.tf-opt--radio .tf-opt__check { border-radius: 50%; }
.tf-opt__name { font-weight: 600; font-size: 18px; flex: 1; }
.tf-opt__price { font-weight: 700; color: var(--tf-primary); }
.tf-opt__free { font-weight: 700; color: var(--tf-success); font-size: 14px; }
.tf-opt__qty { display: flex; align-items: center; gap: 12px; }

.tf-stepper { display: flex; align-items: center; gap: 14px; }
.tf-stepper button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--tf-line); background: var(--tf-surface); font-size: 24px; cursor: pointer; display: grid; place-items: center; }
.tf-stepper button:active { transform: scale(0.9); }
.tf-stepper__val { font-weight: 800; font-size: 22px; min-width: 32px; text-align: center; }

.tf-flavorgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tf-flavor { border: 2px solid var(--tf-line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: all 0.15s; }
.tf-flavor--selected { border-color: var(--tf-primary); box-shadow: 0 8px 20px rgba(230,57,70,0.2); }
.tf-flavor img { width: 100%; height: 100px; object-fit: cover; }
.tf-flavor__body { padding: 10px 12px; }
.tf-flavor__name { font-weight: 800; font-size: 16px; }
.tf-flavor__desc { font-size: 12px; color: var(--tf-muted); line-height: 1.3; }
.tf-counter-pill { background: var(--tf-secondary); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 15px; }

/* ---------- Cart page ---------- */
.tf-content { padding: 26px 28px 180px; max-width: 900px; margin: 0 auto; width: 100%; }
.tf-h1 { font-size: 40px; margin-bottom: 8px; }
.tf-cart-item { background: var(--tf-surface); border-radius: 18px; padding: 18px 20px; box-shadow: var(--tf-shadow); margin-bottom: 14px; display: flex; gap: 16px; }
.tf-cart-item__body { flex: 1; }
.tf-cart-item__name { font-weight: 800; font-size: 20px; }
.tf-cart-item__opts { color: var(--tf-muted); font-size: 15px; margin-top: 4px; line-height: 1.5; }
.tf-cart-item__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.tf-cart-item__price { font-weight: 800; font-size: 20px; color: var(--tf-primary); }

.tf-totals { background: var(--tf-surface); border-radius: 18px; padding: 22px; box-shadow: var(--tf-shadow); margin-top: 8px; }
.tf-totals__row { display: flex; justify-content: space-between; font-size: 18px; padding: 6px 0; }
.tf-totals__row--total { border-top: 2px dashed var(--tf-line); margin-top: 8px; padding-top: 14px; font-family: var(--tf-display); font-weight: 800; font-size: 28px; }
.tf-totals__row--total span:last-child { color: var(--tf-primary); }

/* ---------- Choice tiles (order type / payment) ---------- */
.tf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tf-tile { background: var(--tf-surface); border: 2px solid var(--tf-line); border-radius: 20px; padding: 30px 20px; text-align: center; cursor: pointer; transition: all 0.16s; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tf-tile__icon { font-size: 46px; }
.tf-tile__name { font-weight: 800; font-size: 20px; }
.tf-tile--selected { border-color: var(--tf-primary); background: #FFF1F2; box-shadow: 0 10px 24px rgba(230,57,70,0.2); }
.tf-tile:active { transform: scale(0.97); }

/* ---------- Inputs ---------- */
.tf-field { margin-bottom: 18px; }
.tf-field label { display: block; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.tf-input { width: 100%; padding: 18px 20px; font-size: 20px; border: 2px solid var(--tf-line); border-radius: 16px; font-family: var(--tf-font); background: var(--tf-surface); }
.tf-input:focus { outline: none; border-color: var(--tf-primary); }
.tf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Success ---------- */
.tf-success { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.tf-success__check { width: 130px; height: 130px; border-radius: 50%; background: var(--tf-success); color: #fff; display: grid; place-items: center; font-size: 70px; margin-bottom: 28px; animation: tf-pop 0.5s cubic-bezier(0.2,1.4,0.4,1) both; }
@keyframes tf-pop { from { transform: scale(0); } to { transform: scale(1); } }
.tf-success h1 { font-size: clamp(44px, 7vw, 72px); }
.tf-success__num { font-family: var(--tf-display); font-weight: 800; font-size: 40px; color: var(--tf-primary); margin: 14px 0; }
.tf-success p { font-size: 22px; color: var(--tf-muted); }
.tf-success__actions { display: flex; flex-direction: column; gap: 14px; margin-top: 40px; width: min(420px, 100%); }
.tf-countdown { color: var(--tf-muted); margin-top: 18px; font-size: 16px; }

.tf-mock-banner { background: #FEF3C7; color: #92400E; text-align: center; padding: 10px; font-weight: 700; font-size: 14px; }

.tf-empty { text-align: center; padding: 80px 20px; color: var(--tf-muted); }
.tf-empty__icon { font-size: 70px; margin-bottom: 16px; }

.tf-notfound { padding: 60px; text-align: center; font-size: 20px; }

/* ---------- Kanban (gestão de pedidos) ---------- */
.tf-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px 24px 60px; align-items: start; }
.tf-kcol { background: #F1EDE8; border-radius: 20px; display: flex; flex-direction: column; min-height: 200px; }
.tf-kcol__head { position: sticky; top: 0; padding: 16px 18px; font-family: var(--tf-display); font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid; border-radius: 20px 20px 0 0; }
.tf-kcol--new .tf-kcol__head { color: #B45309; border-color: #F59E0B; }
.tf-kcol--prep .tf-kcol__head { color: #1D4ED8; border-color: #3B82F6; }
.tf-kcol--ready .tf-kcol__head { color: #047857; border-color: #10B981; }
.tf-kcol--done .tf-kcol__head { color: #4B5563; border-color: #9CA3AF; }
.tf-kcol__count { background: rgba(0,0,0,0.08); border-radius: 999px; padding: 2px 12px; font-size: 15px; }
.tf-kcol__body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.tf-korder { background: var(--tf-surface); border-radius: 16px; padding: 14px 16px; box-shadow: var(--tf-shadow); border: 1px solid var(--tf-line); }
.tf-korder__top { display: flex; align-items: baseline; justify-content: space-between; }
.tf-korder__num { font-family: var(--tf-display); font-weight: 800; font-size: 20px; color: var(--tf-primary); }
.tf-korder__time { color: var(--tf-muted); font-size: 13px; }
.tf-korder__wait { color: var(--tf-muted); font-size: 13px; font-weight: 600; }
.tf-korder__wait--urgent { color: #B91C1C; }
.tf-korder--urgent { border-color: #EF4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.25), var(--tf-shadow); animation: tf-urgent 1.6s ease-in-out infinite; }
@keyframes tf-urgent { 0%,100% { box-shadow: 0 0 0 2px rgba(239,68,68,0.2), var(--tf-shadow); } 50% { box-shadow: 0 0 0 4px rgba(239,68,68,0.45), var(--tf-shadow); } }
.tf-korder__cust { font-weight: 700; font-size: 16px; margin-top: 2px; }
.tf-korder__meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tf-chip { background: #F3F4F6; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: #374151; }
.tf-korder__items { font-size: 14px; color: var(--tf-muted); line-height: 1.5; margin: 6px 0; }
.tf-korder__items li { list-style: none; }
.tf-korder__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.tf-korder__total { font-weight: 800; font-size: 18px; }
.tf-korder__actions { display: flex; gap: 6px; }
.tf-kbtn { border: none; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform 0.1s; }
.tf-kbtn:active { transform: scale(0.94); }
.tf-kbtn--advance { background: var(--tf-primary); color: #fff; }
.tf-kbtn--back { background: #F3F4F6; color: #374151; }
.tf-kbtn--cancel { background: #FEE2E2; color: #B91C1C; }
@media (max-width: 1000px) { .tf-kanban { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tf-kanban { grid-template-columns: 1fr; } }

/* ---------- Detalhe do pedido ---------- */
.tf-korder { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.18s ease; }
.tf-korder:hover { transform: translateY(-2px); box-shadow: var(--tf-shadow-lg); }
.tf-detail-block { border: 1px solid var(--tf-line); border-radius: 16px; padding: 16px 18px; margin: 14px 0; }
.tf-detail-block__title { font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.tf-detail-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 16px; color: var(--tf-muted); }
.tf-detail-row strong, .tf-detail-row span:last-child { color: var(--tf-ink); }
.tf-detail-row--total { border-top: 2px dashed var(--tf-line); margin-top: 6px; padding-top: 12px; font-size: 20px; font-family: var(--tf-display); }
.tf-detail-row--total strong { color: var(--tf-primary); }
.tf-detail-text { color: var(--tf-ink); font-size: 16px; line-height: 1.5; }
.tf-detail-item { padding: 12px 0; border-bottom: 1px dashed var(--tf-line); }
.tf-detail-item:last-child { border-bottom: none; }
.tf-detail-item__head { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; }
.tf-detail-item__price { color: var(--tf-primary); }
.tf-detail-opt { color: var(--tf-muted); font-size: 15px; margin-top: 4px; padding-left: 6px; }
.tf-detail-opt--remove { color: #B91C1C; }

/* ---------- Toggle de som ---------- */
.tf-sound-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--tf-muted); cursor: pointer; }

/* ---------- Admin ---------- */
.tf-admin { max-width: 1100px; margin: 0 auto; width: 100%; padding: 26px 28px 80px; }
.tf-admin__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.tf-admin__card { background: var(--tf-surface); border: 1px solid var(--tf-line); border-radius: 20px; padding: 26px; box-shadow: var(--tf-shadow); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.tf-admin__card:hover { transform: translateY(-4px); box-shadow: var(--tf-shadow-lg); }
.tf-admin__card-icon { font-size: 40px; }
.tf-admin__card-title { font-family: var(--tf-display); font-weight: 800; font-size: 22px; margin: 10px 0 4px; }
.tf-admin__card-sub { color: var(--tf-muted); font-size: 14px; }

.tf-panel { background: var(--tf-surface); border: 1px solid var(--tf-line); border-radius: 18px; padding: 22px; box-shadow: var(--tf-shadow); margin-bottom: 18px; }
.tf-panel__title { font-family: var(--tf-display); font-weight: 800; font-size: 20px; margin-bottom: 14px; }

.tf-table { width: 100%; border-collapse: collapse; }
.tf-table th { text-align: left; font-size: 13px; color: var(--tf-muted); text-transform: uppercase; padding: 10px 12px; border-bottom: 2px solid var(--tf-line); }
.tf-table td { padding: 12px; border-bottom: 1px solid var(--tf-line); font-size: 15px; vertical-align: middle; }
.tf-table tr:hover td { background: #FAF6F1; }
.tf-badge-on { background: #DCFCE7; color: #166534; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.tf-badge-off { background: #F3F4F6; color: #6B7280; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }

.tf-btn--sm { padding: 8px 14px; font-size: 14px; }
.tf-row-actions { display: flex; gap: 8px; }

.tf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tf-form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.tf-input--sm { padding: 12px 14px; font-size: 16px; }
.tf-select { width: 100%; padding: 14px 16px; font-size: 16px; border: 2px solid var(--tf-line); border-radius: 14px; background: var(--tf-surface); font-family: var(--tf-font); }
.tf-check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding: 10px 0; cursor: pointer; }
.tf-check input { width: 22px; height: 22px; }
.tf-color-row { display: flex; align-items: center; gap: 10px; }
.tf-color-row input[type=color] { width: 54px; height: 44px; border: 2px solid var(--tf-line); border-radius: 12px; background: none; cursor: pointer; }
.tf-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--tf-success); color: #fff; padding: 14px 26px; border-radius: 999px; font-weight: 700; box-shadow: var(--tf-shadow-lg); z-index: 80; animation: tf-fade 0.3s ease; }
.tf-toast--error { background: #DC2626; }

/* ---------- Upload de imagem ---------- */
.tf-upload { display: flex; gap: 14px; align-items: center; }
.tf-upload__preview { width: 96px; height: 96px; border-radius: 14px; border: 2px dashed var(--tf-line); overflow: hidden; display: grid; place-items: center; background: #FAF6F1; flex: 0 0 auto; }
.tf-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.tf-upload__placeholder { color: var(--tf-muted); font-size: 12px; text-align: center; }
.tf-upload__actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Composição do produto ---------- */
.tf-compo-note { background: #FEF9C3; border: 1px solid #FDE68A; color: #854D0E; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.tf-linkbtn { background: none; border: none; color: var(--tf-primary); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; font-size: inherit; }
.tf-compo-pizza { margin-bottom: 18px; }
.tf-compo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tf-compo-col h4 { font-size: 15px; margin-bottom: 8px; color: var(--tf-secondary); }
.tf-compo-chip { background: #F3F4F6; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 6px; }
.tf-compo-group { border: 1px solid var(--tf-line); border-radius: 16px; padding: 16px; margin-bottom: 14px; background: #FCFAF7; }
.tf-compo-group__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tf-compo-group__editor { background: #fff; border: 1px dashed var(--tf-primary); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.tf-compo-tags { color: var(--tf-muted); font-size: 13px; font-weight: 500; margin-left: 8px; }
.tf-compo-table { margin: 6px 0; }
.tf-compo-table td, .tf-compo-table th { padding: 8px 10px; }
.tf-compo-addopt { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.tf-compo-addopt .tf-input { flex: 1; min-width: 140px; }
.tf-compo-newgroup { border-top: 2px dashed var(--tf-line); padding-top: 16px; margin-top: 8px; }
.tf-row-active td { background: #FFF1F2 !important; }
@media (max-width: 640px) { .tf-compo-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tf-form-grid, .tf-form-grid--3 { grid-template-columns: 1fr; } }

/* ---------- Totem vertical (retrato) ---------- */
@media (min-aspect-ratio: 1/1) and (min-width: 1400px) {
    .tf-products { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
@media (max-width: 640px) {
    .tf-products { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 14px 160px; }
    .tf-card__img { height: 130px; }
    .tf-card__name { font-size: 18px; }
    .tf-card__desc { display: none; }
    .tf-card__price { font-size: 20px; }
    .tf-grid-2 { grid-template-columns: 1fr; }
    .tf-topbar__title { font-size: 20px; }
    .tf-h1 { font-size: 30px; }
}
