/* SM Food - estilo (mesmo visual do painel do restaurante) - autor: Smokey */

:root {
    --brand: #ea1d2c;
    --brand-dark: #c8102e;
    --brand-soft: rgba(234, 29, 44, .10);
    --bg: #f4f5f7;
    --bg2: #f3f4f6;
    --surface: #ffffff;
    --text: #111827;
    --text2: #374151;
    --muted: #6b7280;
    --border: #e5e7eb;
    --border2: #d1d5db;
    --green: #16a34a;
    --green-bg: #dcfce7;
    --green-text: #166534;
    --amber: #d97706;
    --amber-bg: #fef3c7;
    --amber-text: #92400e;
    --blue: #2563eb;
    --blue-bg: #dbeafe;
    --blue-text: #1e40af;
    --red: #dc2626;
    --red-bg: #fee2e2;
    --red-text: #b91c1c;
    --purple: #7c3aed;
    --purple-bg: #ede9fe;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .18);
    --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --display: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
}

html.escuro {
    --bg: #0f1216;
    --bg2: #1f242c;
    --surface: #171b21;
    --text: #eef0f3;
    --text2: #d5d9df;
    --muted: #a3abb7;
    --border: #2d333d;
    --border2: #3c4350;
    --green-bg: #133824;
    --amber-bg: #3d2f0c;
    --blue-bg: #142b4d;
    --red-bg: #451a1d;
    --purple-bg: #2e2050;
    --green-text: #6ee7a0;
    --amber-text: #fcd34d;
    --blue-text: #93c5fd;
    --red-text: #fca5a5;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg2);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}
button { font-family: inherit; font-size: inherit; color: inherit; }
input, select, textarea {
    font-family: inherit; font-size: 14px; color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border2); border-radius: 9px; padding: 9px 11px; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 64px; }
input[type=checkbox] { width: auto; accent-color: var(--brand); transform: scale(1.15); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd0d8; border-radius: 8px; }
html.escuro ::-webkit-scrollbar-thumb { background: #3c4350; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ============ Login ============ */
.login {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 80% 15%, rgba(234, 29, 44, .22), transparent 55%), #111827;
}
.login-box {
    width: 340px; max-width: calc(100% - 32px);
    background: var(--surface); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow-lg);
    text-align: center;
}
.login-box .logo { justify-content: center; margin-bottom: 6px; }
.login-box p { color: var(--muted); margin-bottom: 18px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; height: 18px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border2); }
.pin-dots span.on { background: var(--brand); border-color: var(--brand); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-pad button {
    height: 56px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg2);
    font-family: var(--display); font-size: 22px; font-weight: 700; cursor: pointer;
}
.pin-pad button:hover { border-color: var(--brand); }
.pin-pad button:active { transform: scale(.97); }
.login-erro { color: var(--red); font-weight: 600; min-height: 20px; margin-top: 12px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

/* ============ Logo ============ */
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--display); line-height: 1; }
.logo-ico {
    width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.logo b { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.4px; line-height: 1.05; text-align: left; }
.logo b em { font-style: normal; color: var(--brand); display: block; font-size: 14px; letter-spacing: 0; }

/* ============ Topo ============ */
.app { display: flex; height: 100vh; }
.sidebar {
    width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.sidebar .logo { height: 60px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 16px; }
.nav-section { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 14px 12px 6px; letter-spacing: .4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none;
    padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left;
    white-space: nowrap;
}
.nav-item i { width: 20px; text-align: center; font-size: 15px; color: var(--text2); }
.nav-item:hover { background: var(--bg2); }
.nav-item.active { background: var(--red-bg); color: var(--brand); font-weight: 600; }
.nav-item.active i { color: var(--brand); }
.tag-new { margin-left: auto; background: #ef4444; color: #fff; border-radius: 999px; font-size: 10px; font-weight: 800; padding: 2px 7px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 10px 12px; font-size: 12px; color: var(--muted); }

.coluna { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.appbar {
    height: 60px; flex-shrink: 0; display: flex; align-items: center; gap: 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 16px;
}
.appbar h1 { font-family: var(--display); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); cursor: pointer; font-size: 15px; color: var(--text2);
    display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn b { position: absolute; top: -6px; right: -6px; background: var(--brand); color: #fff; font-size: 10px; border-radius: 999px; padding: 1px 5px; }
.tema-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text2); white-space: nowrap;
}
.tema-btn:hover { border-color: var(--brand); color: var(--brand); }
.tema-btn i { font-size: 15px; color: #f59e0b; }
html.escuro .tema-btn i { color: #93c5fd; }
.store-status {
    border: none; border-radius: 10px; padding: 10px 16px; font-family: var(--display); font-weight: 700;
    font-size: 13px; color: #fff; cursor: pointer; background: var(--green);
}
.store-status.closed { background: #ef4444; }
.user-badge {
    display: flex; align-items: center; gap: 8px; background: #111827; color: #fff; border-radius: 10px;
    padding: 8px 12px; font-family: var(--display); font-weight: 600; font-size: 13px; cursor: pointer; border: none;
}
.user-badge small { opacity: .65; font-weight: 500; }
.menu-btn { display: none; }

.main { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; }
.pad { padding: 18px; }

/* ============ Barra de ferramentas ============ */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.toolbar .busca { max-width: 260px; }
.tool-btn {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
    padding: 9px 14px; border-radius: 10px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tool-btn:hover { border-color: var(--brand); }
.tool-btn.green { color: var(--green); }
.tool-btn.blue { color: var(--blue); }
.tool-btn.purple { color: var(--purple); }
.tool-btn.active { background: var(--red-bg); border-color: var(--brand); color: var(--brand); }
.tool-btn kbd { font-family: var(--font); font-size: 11px; color: var(--muted); font-weight: 600; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 10px;
    padding: 10px 16px; font-weight: 700; cursor: pointer; background: var(--brand); color: #fff; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sec { background: var(--bg2); color: var(--text); border: 1px solid var(--border); }
.btn.sec:hover { border-color: var(--brand); }
.btn.green { background: var(--green); }
.btn.green:hover { background: #15803d; }
.btn.amber { background: #f59e0b; }
.btn.blue { background: var(--blue); }
.btn.dark { background: #111827; }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--brand); background: var(--bg2); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 14px 20px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.danger { background: none; color: var(--red); border: 1px solid var(--red-bg); }
.btn.danger:hover { background: var(--red-bg); }

/* ============ Kanban ============ */
.kanban { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 0 18px 18px; overflow-x: auto; }
.kcol {
    flex: 1; min-width: 270px; display: flex; flex-direction: column; background: var(--bg);
    border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
html.escuro .kcol { background: #13171c; }
.kcol-head {
    display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 4px solid var(--c, #999);
    background: var(--surface); border-bottom: 1px solid var(--border);
}
.kcol-head .pill { font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--cbg); color: var(--c); }
.kcol-head .count { font-weight: 700; color: var(--muted); }
.kcol-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.kempty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }
.kempty i { display: block; font-size: 28px; margin-bottom: 8px; opacity: .4; }
.kcol.analise { --c: #7c3aed; --cbg: var(--purple-bg); }
.kcol.preparando { --c: #16a34a; --cbg: var(--green-bg); }
.kcol.pronto { --c: #d97706; --cbg: var(--amber-bg); }
.kcol.entrega { --c: #2563eb; --cbg: var(--blue-bg); }
.kcol.concluido { --c: #6b7280; --cbg: var(--bg2); max-width: 300px; }

.ocard {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
    cursor: pointer; box-shadow: var(--shadow); border-left: 4px solid var(--c, var(--border));
    transition: transform .1s;
}
.ocard:hover { transform: translateY(-1px); border-color: var(--border2); border-left-color: var(--c); }
.ocard-top { display: flex; align-items: flex-start; gap: 8px; }
.ocard-num { font-family: var(--display); font-weight: 800; font-size: 17px; }
.ocard-num small { font-family: var(--font); font-size: 11px; color: var(--muted); font-weight: 500; }
.ocard-time { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); }
.ocard-time b { display: block; color: var(--green); }
.ocard-time b.late { color: var(--red); }
.tipo { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; margin: 6px 0; }
.tipo.delivery { color: var(--red); }
.tipo.retirada { color: var(--blue); }
.tipo.balcao { color: var(--purple); }
.tipo.mesa, .tipo.comanda { color: var(--amber); }
.ocard-cli { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ocard-end { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.ocard-total { font-family: var(--display); font-weight: 700; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.badge.pago { background: var(--green-bg); color: var(--green-text); }
.badge.apagar { background: var(--amber-bg); color: var(--amber-text); }
.badge.cinza { background: var(--bg2); color: var(--muted); }
.badge.azul { background: var(--blue-bg); color: var(--blue-text); }
.badge.verm { background: var(--red-bg); color: var(--red-text); }
.badge.roxo { background: var(--purple-bg); color: var(--purple); }
.ocard-act { margin-left: auto; }
.ocard.mini { padding: 9px 12px; }
.ocard.mini .ocard-num { font-size: 14px; }

/* ============ Mesas ============ */
.mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 0 18px 18px; }
.mesa {
    position: relative; min-height: 120px; border-radius: 14px; border: 2px solid var(--green); background: var(--surface);
    padding: 12px; cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.mesa:hover { transform: translateY(-1px); }
.mesa-num { font-family: var(--display); font-weight: 800; font-size: 22px; }
.mesa-st { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--green); }
.mesa-info { margin-top: auto; font-size: 12px; color: var(--muted); }
.mesa-total { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--text); }
.mesa.ocupada { border-color: var(--brand); background: linear-gradient(180deg, var(--red-bg), var(--surface) 70%); }
.mesa.ocupada .mesa-st { color: var(--brand); }
.mesa.conta { border-color: #f59e0b; background: linear-gradient(180deg, var(--amber-bg), var(--surface) 70%); }
.mesa.conta .mesa-st { color: var(--amber); }
.mesa .sino { position: absolute; top: 10px; right: 10px; background: var(--green); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 3px 8px; animation: pulsa 1.2s infinite; }
@keyframes pulsa { 50% { opacity: .55; } }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--muted); align-items: center; }
.legenda span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); vertical-align: -1px; }

/* ============ Editor de pedido (PDV) ============ */
.editor { flex: 1; min-height: 0; display: flex; }
.ed-produtos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-cats { display: flex; gap: 8px; padding: 0 18px 12px; overflow-x: auto; flex-shrink: 0; }
.chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 0 18px 18px; align-content: start; }
.prod {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer;
    display: flex; flex-direction: column; text-align: left; box-shadow: var(--shadow); user-select: none;
}
.prod:hover { border-color: var(--brand); }
.prod:active { transform: scale(.98); }
.prod-img { height: 86px; background: var(--bg2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 26px; }
.prod-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.prod-nome { font-weight: 600; font-size: 13px; line-height: 1.25; }
.prod-preco { margin-top: auto; font-family: var(--display); font-weight: 700; color: var(--brand); }
.prod.off { opacity: .45; }

.ed-carrinho {
    width: 380px; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.ed-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.ed-head h2 { font-family: var(--display); font-size: 17px; }
.ed-itens { flex: 1; overflow-y: auto; padding: 8px 10px; }
.ed-vazio { text-align: center; color: var(--muted); padding: 40px 10px; }
.ed-vazio i { font-size: 34px; display: block; margin-bottom: 10px; opacity: .35; }
.citem { display: flex; gap: 10px; padding: 10px 8px; border-bottom: 1px dashed var(--border); align-items: flex-start; }
.citem-qtd { display: flex; align-items: center; gap: 4px; }
.citem-qtd button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg2); cursor: pointer; font-weight: 800; }
.citem-qtd span { min-width: 22px; text-align: center; font-weight: 700; }
.citem-info { flex: 1; min-width: 0; }
.citem-nome { font-weight: 600; }
.citem-sub { font-size: 12px; color: var(--muted); }
.citem-obs { font-size: 12px; color: var(--amber-text); background: var(--amber-bg); border-radius: 6px; padding: 2px 6px; display: inline-block; margin-top: 3px; }
.citem-preco { font-weight: 700; white-space: nowrap; }
.citem-acts { display: flex; gap: 2px; }
.citem-acts button { border: none; background: none; color: var(--muted); cursor: pointer; padding: 3px 5px; border-radius: 6px; }
.citem-acts button:hover { color: var(--brand); background: var(--bg2); }
.citem.enviado .citem-nome::after { content: ' \f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--green); font-size: 11px; }
.citem.cancelado { opacity: .45; text-decoration: line-through; }
.st-item { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; margin-left: 4px; vertical-align: 1px; }
.st-item.novo { background: var(--blue-bg); color: var(--blue-text); }
.st-item.preparo { background: var(--amber-bg); color: var(--amber-text); }
.st-item.pronto { background: var(--green-bg); color: var(--green-text); }
.st-item.entregue { background: var(--bg2); color: var(--muted); }
.ed-sep { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; }
.ed-tot { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; flex-direction: column; gap: 5px; }
.ed-tot .ln { display: flex; justify-content: space-between; color: var(--text2); }
.ed-tot .ln.total { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--text); margin-top: 4px; }
.ed-tot .ln a { color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 600; text-decoration: none; }
.ed-acts { padding: 0 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-acts .full { grid-column: 1 / -1; }
.ed-cli { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.ed-cli .row { display: flex; gap: 8px; }

/* ============ Formularios, cartoes, tabelas ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card-h h3 { font-family: var(--display); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.span2 { grid-column: span 2; }
.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; font-weight: 700; color: var(--text2); }
.field small { color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 1; }
.tabela td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabela tr.click { cursor: pointer; }
.tabela tr.click:hover td { background: var(--bg); }
.tabela .r { text-align: right; }
.tabela .c { text-align: center; }

.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; overflow-x: auto; }
.tab { border: none; background: none; padding: 13px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi label { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; margin-top: 4px; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.green b { color: var(--green); }
.kpi.red b { color: var(--red); }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty i { font-size: 40px; display: block; margin-bottom: 12px; opacity: .35; }

.barra { height: 8px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.barra > span { display: block; height: 100%; background: var(--brand); border-radius: 6px; }

/* ============ Modal ============ */
.modal-bg {
    position: fixed; inset: 0; z-index: 60; background: rgba(15, 18, 22, .55);
    display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
    background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 520px; max-width: 100%;
    max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: sobe .18s;
}
@keyframes sobe { from { transform: translateY(14px); opacity: 0; } }
.modal.lg { width: 820px; }
.modal.xl { width: 1080px; }
.modal.sm { width: 400px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-h h2 { font-family: var(--display); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-x { margin-left: auto; width: 34px; height: 34px; border: none; background: var(--bg2); border-radius: 9px; cursor: pointer; font-size: 16px; color: var(--muted); }
.modal-x:hover { color: var(--brand); }
.modal-b { padding: 18px; overflow-y: auto; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ============ Toast ============ */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: #111827; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 10px; font-weight: 600; animation: sobe .2s; max-width: 380px;
}
.toast.ok i { color: #4ade80; }
.toast.erro { background: var(--red); }
.toast.aviso i { color: #fbbf24; }

/* ============ Pagamento ============ */
.pg-resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pg-resumo div { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.pg-resumo label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.pg-resumo b { display: block; font-family: var(--display); font-size: 20px; }
.pg-resumo .falta b { color: var(--brand); }
.pg-formas { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.pg-forma { border: 2px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 6px; cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pg-forma i { font-size: 20px; color: var(--muted); }
.pg-forma.active { border-color: var(--brand); background: var(--red-bg); color: var(--brand); }
.pg-forma.active i { color: var(--brand); }
.pg-lista { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.pg-linha { display: flex; align-items: center; gap: 10px; background: var(--green-bg); color: var(--green-text); padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.pg-linha button { margin-left: auto; border: none; background: none; color: inherit; cursor: pointer; }
.atalhos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.atalhos button { border: 1px solid var(--border); background: var(--bg2); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 600; font-size: 12px; }

/* ============ Cozinha (KDS) ============ */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 0 18px 18px; align-items: start; }
.kds-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.kds-h { padding: 10px 14px; display: flex; align-items: center; gap: 8px; color: #fff; background: #374151; }
.kds-h b { font-family: var(--display); font-size: 18px; }
.kds-h .t { margin-left: auto; font-weight: 700; }
.kds-card.atraso .kds-h { background: var(--red); }
.kds-card.medio .kds-h { background: #d97706; }
.kds-card.ok .kds-h { background: var(--green); }
.kds-it { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.kds-it:hover { background: var(--bg); }
.kds-it .q { font-family: var(--display); font-weight: 800; font-size: 18px; min-width: 32px; }
.kds-it .n { font-weight: 700; font-size: 15px; }
.kds-it .o { color: var(--amber-text); font-size: 13px; font-weight: 600; }
.kds-it .a { color: var(--muted); font-size: 13px; }
.kds-it.preparo { background: var(--amber-bg); }
.kds-it.pronto { opacity: .5; }
.kds-it.pronto .n { text-decoration: line-through; }
.kds-it .s { margin-left: auto; }

/* ============ Graficos ============ */
.chart { width: 100%; height: 220px; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--brand); }
.chart .bar:hover { fill: var(--brand-dark); }
.chart .grid { stroke: var(--border); }
.rank { display: flex; flex-direction: column; gap: 10px; }
.rank-it { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; }
.rank-it .pos { font-weight: 800; color: var(--muted); }
.rank-it .nm { font-weight: 600; }
.rank-it .barra { grid-column: 2 / 4; margin-top: -4px; }

/* ============ Diversos ============ */
.lista-simples { display: flex; flex-direction: column; }
.lista-simples > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.lista-simples > div:last-child { border-bottom: none; }
.adic-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; margin-bottom: 6px; }
.adic-opt.on { border-color: var(--brand); background: var(--red-bg); }
.adic-opt b { margin-left: auto; }
.qtd-big { display: flex; align-items: center; gap: 12px; }
.qtd-big button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); font-size: 18px; font-weight: 800; cursor: pointer; }
.qtd-big span { font-family: var(--display); font-size: 22px; font-weight: 800; min-width: 30px; text-align: center; }
.foto-prev { width: 100%; height: 150px; border-radius: 12px; border: 2px dashed var(--border2); background: var(--bg2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; flex-direction: column; gap: 6px; }
.cor-op { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border2); cursor: pointer; }
.cor-op.on { box-shadow: 0 0 0 2px var(--text); }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--amber-bg); color: var(--amber-text); font-weight: 500; }
.aviso.azul { background: var(--blue-bg); color: var(--blue-text); }
.aviso.verde { background: var(--green-bg); color: var(--green-text); }
.aviso.verm { background: var(--red-bg); color: var(--red-text); }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; }
.status-dot.off { background: var(--red); }

/* ============ Celular / tablet ============ */
@media (max-width: 900px) {
    .sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
    .sidebar.aberta { transform: none; }
    .menu-btn { display: inline-flex; }
    .user-badge small, .store-status span, .tema-btn span { display: none; }
    .ed-carrinho { width: 100%; position: fixed; inset: 60px 0 0 0; z-index: 50; transform: translateY(100%); transition: transform .2s; }
    .ed-carrinho.aberto { transform: none; }
    .carrinho-fab { display: flex !important; }
    .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
    .span2 { grid-column: auto; }
    .kanban { flex-direction: column; overflow-y: auto; }
    .kcol { min-height: 240px; max-width: none !important; }
    .appbar h1 { font-size: 15px; }
    .toolbar { padding: 12px; }
    .prod-grid, .mesas-grid, .kds { padding: 0 12px 80px; }
    .pg-resumo { grid-template-columns: 1fr 1fr; }
}
.carrinho-fab {
    display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45; background: var(--brand); color: #fff;
    border: none; border-radius: 14px; padding: 14px 18px; font-weight: 800; font-size: 15px; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); cursor: pointer;
}
.carrinho-fab span { margin-left: auto; }

@media print { body * { visibility: hidden; } }

/* ============ Ajustes do modo noturno ============ */
html.escuro .user-badge { background: var(--bg2); border: 1px solid var(--border2); }
html.escuro .login { background: radial-gradient(circle at 80% 15%, rgba(234, 29, 44, .18), transparent 55%), #0b0d10; }
html.escuro .modal-bg { background: rgba(0, 0, 0, .65); }
html.escuro .toast { background: #2a3039; border: 1px solid var(--border2); }
html.escuro .prod-img, html.escuro .foto-prev { background-color: #232932; }
html.escuro .kds-h { background: #2d333d; }
html.escuro .cd-topo { filter: brightness(.9); }

/* Mesas: comanda e pessoas */
.mesa-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pc-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.pc-n { height: 40px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg2); font-weight: 700; font-size: 15px; cursor: pointer; color: var(--text); }
.pc-n:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pc-n.usada { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

/* ============ Cartao de mesa (com icone) ============ */
.mesas-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.mesa { --mc: #16a34a; --mbg: rgba(22, 163, 74, .08); gap: 4px; min-height: 140px; padding: 12px 14px; border: 2px solid var(--mc); background: linear-gradient(160deg, var(--mbg), var(--surface) 75%); transition: transform .12s, box-shadow .12s; }
.mesa:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.mesa.ocupada { --mc: #dc2626; --mbg: rgba(220, 38, 38, .12); border-color: var(--mc); background: linear-gradient(160deg, var(--mbg), var(--surface) 75%); }
.mesa.conta { --mc: #f59e0b; --mbg: rgba(245, 158, 11, .14); border-color: var(--mc); background: linear-gradient(160deg, var(--mbg), var(--surface) 75%); }
.mesa-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mesa-id { display: flex; flex-direction: column; line-height: 1; }
.mesa-id small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.mesa-id .mesa-num { font-size: 30px; margin-top: 3px; }
.mesa-ico { width: 64px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--mc); background: var(--mbg); flex-shrink: 0; font-size: 24px; }
.mesa .mesa-st, .mesa.ocupada .mesa-st, .mesa.conta .mesa-st { color: var(--mc); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.mesa-st i { font-size: 7px; }
.mesa-info { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--muted); }
.mesa-info.abrir { justify-content: flex-start; color: var(--mc); font-weight: 600; }
.mesa .sino { top: auto; bottom: 46px; right: 10px; }

/* Para viagem */
.tag-viagem { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; background: var(--purple-bg); color: var(--purple); }
html.escuro .tag-viagem { color: #c4b5fd; }
.viagem-opt { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 2px dashed var(--border2); border-radius: 12px; cursor: pointer; }
.viagem-opt > i { font-size: 20px; color: var(--purple); }
.viagem-opt span { display: flex; flex-direction: column; }
.viagem-opt small { color: var(--muted); font-size: 12px; }
.viagem-opt.on { border-style: solid; border-color: var(--purple); background: var(--purple-bg); }
.viagem-btn { background: var(--bg2); color: var(--text); border: 2px dashed var(--border2); }
.viagem-btn:hover { background: var(--bg2); border-color: var(--purple); }
.viagem-btn.on { background: var(--purple); color: #fff; border: 2px solid var(--purple); }
.viagem-btn.on:hover { background: #6d28d9; }

[hidden] { display: none !important; }

/* Entrada pelo nome */
.login-box { width: 420px; }
.login-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 52vh; overflow-y: auto; text-align: left; }
.login-pessoa { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg2); cursor: pointer; text-align: left; }
.login-pessoa:hover { border-color: var(--brand); }
.login-pessoa.ultimo { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.lp-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lp-txt { display: flex; flex-direction: column; min-width: 0; }
.lp-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-txt small { color: var(--muted); font-size: 12px; }
.login-voltar { border: none; background: none; color: var(--muted); cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.login-voltar:hover { color: var(--brand); }
.login-servidor { margin-top: 12px; font-size: 12px; color: var(--muted); }
.login-servidor a { color: var(--blue); cursor: pointer; font-weight: 600; }

/* Item que acabou de entrar/somar no carrinho */
.citem.piscou { animation: piscou .6s; }
@keyframes piscou { 0% { background: var(--brand-soft); } 100% { background: transparent; } }

/* Permissoes na Equipe */
.perm-lista { display: flex; flex-direction: column; gap: 10px; }

/* App dos garcons: tela pequena, so o essencial */
html.modo-app #loja-status, html.modo-app .appbar [title="Tela cheia"], html.modo-app .tema-btn span { display: none !important; }
html.modo-app .appbar { height: 54px; padding: 0 10px; gap: 8px; }
html.modo-app .user-badge { padding: 8px 10px; }
html.modo-app .login-box { width: 100%; max-width: 100%; height: 100%; border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
html.modo-app .login-lista { grid-template-columns: 1fr; max-height: none; }
html.modo-app .login-pessoa { padding: 14px; }
html.modo-app .pin-pad button { height: 64px; }

/* Mesa em uso por outro garcom */
.mesa-uso { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 9px; background: #111827; color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.escuro .mesa-uso { background: #f59e0b; color: #111827; }
.mesa.em-uso { opacity: .92; }
.mesa.em-uso .mesa-info { visibility: hidden; }
.trava-ico { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--amber-bg); color: var(--amber); display: flex; align-items: center; justify-content: center; font-size: 28px; }

/* ============ App do garcom / celular: mesas pequenas, 5 por linha ============ */
html.modo-app .mesas-grid, .mesas-grid.compacto { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0 8px 16px; }
html.modo-app .mesa { min-height: 0; padding: 6px 4px 5px; border-radius: 10px; border-width: 2px; gap: 1px; align-items: center; text-align: center; }
html.modo-app .mesa:hover { transform: none; box-shadow: none; }
html.modo-app .mesa-topo { flex-direction: column-reverse; align-items: center; gap: 0; }
html.modo-app .mesa-id small { display: none; }
html.modo-app .mesa-id .mesa-num { font-size: 19px; margin: 0; }
html.modo-app .mesa-ico { width: auto; height: 22px; background: none; border-radius: 0; font-size: 15px; }
html.modo-app .mesa-ico svg { width: 30px; height: 22px; }
html.modo-app .mesa .mesa-st { display: none; }
html.modo-app .mesa-tags { margin: 1px 0 0; justify-content: center; gap: 2px; }
html.modo-app .mesa-tags .badge { padding: 1px 4px; font-size: 9.5px; border-radius: 4px; }
html.modo-app .mesa-tags .badge.cinza { display: none; }
html.modo-app .mesa-tags .badge i { display: none; }
html.modo-app .mesa-info { border: none; padding: 0; margin: 0; justify-content: center; font-size: 10px; }
html.modo-app .mesa-info > span:last-child:not(.mesa-total) { display: none; }
html.modo-app .mesa-info.abrir { display: none; }
html.modo-app .mesa-total { font-size: 10.5px; }
html.modo-app .mesa .sino { top: -6px; right: -4px; bottom: auto; font-size: 9px; padding: 1px 5px; }
html.modo-app .mesa-uso { left: 2px; right: 2px; bottom: 2px; padding: 2px 3px; font-size: 9px; border-radius: 6px; gap: 3px; }
html.modo-app .mesa.em-uso .mesa-tags, html.modo-app .mesa.em-uso .mesa-info { visibility: hidden; }
html.modo-app .legenda { gap: 10px; font-size: 11px; }
html.modo-app .toolbar { padding: 8px; gap: 6px; }
@media (max-width: 340px) { html.modo-app .mesas-grid { grid-template-columns: repeat(4, 1fr); } }
html.modo-app .mesa { height: 86px; justify-content: center; }
html.modo-app .mesa.livre .mesa-topo { margin-top: 2px; }
html.modo-app .appbar h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html.modo-app .appbar h1 i { display: none; }
html.modo-app .user-badge { max-width: 120px; overflow: hidden; }
html.modo-app .user-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.modo-app .tabs .tab { padding: 10px 12px; }

/* Senha do gerente para cancelar */
.autoriza { margin-top: 14px; padding: 14px; border-radius: 12px; border: 2px solid var(--amber); background: var(--amber-bg); text-align: center; }
.autoriza-h { font-weight: 800; color: var(--amber-text); margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.autoriza input { text-align: center; font-size: 26px; letter-spacing: 10px; font-weight: 800; max-width: 180px; }
.trava-ico.chamando { background: var(--red-bg); color: var(--red); animation: chamando .8s infinite; }
@keyframes chamando { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

/* Nome de quem esta usando: sempre dentro do cartao, corta com "..." se for comprido */
.mesa { overflow: hidden; }
.mesa-uso { max-width: calc(100% - 20px); }
.mesa-uso .mu-nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mesa-uso .mu-txt { flex-shrink: 0; }
.mesa-uso i { flex-shrink: 0; }

/* App do garcom: 4 cartoes por linha, maiores e mais faceis de ler */
html.modo-app .mesas-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 10px 16px; }
html.modo-app .mesa { height: 100px; padding: 7px 5px 6px; border-radius: 12px; }
html.modo-app .mesa-id .mesa-num { font-size: 24px; }
html.modo-app .mesa-ico { height: 26px; }
html.modo-app .mesa-ico svg { width: 38px; height: 28px; }
html.modo-app .mesa-tags .badge { font-size: 11px; padding: 1px 6px; }
html.modo-app .mesa-total { font-size: 12px; }
html.modo-app .mesa .sino { top: 3px; right: 3px; }
html.modo-app .mesa-uso { left: 4px; right: 4px; bottom: 4px; max-width: none; padding: 4px 5px; font-size: 11px; gap: 4px; justify-content: center; }
html.modo-app .mesa-uso .mu-txt { display: none; }
@media (max-width: 300px) { html.modo-app .mesas-grid { grid-template-columns: repeat(3, 1fr); } }
/* app: cadeado no canto, faixa embaixo so com o nome inteiro */
html.modo-app .mesa.em-uso { justify-content: flex-start; padding-top: 6px; }
html.modo-app .mesa.em-uso::before { content: '\f023'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 5px; left: 7px; font-size: 12px; color: #f59e0b; }
html.modo-app .mesa-uso { left: 3px; right: 3px; bottom: 3px; padding: 3px 2px; font-size: 10.5px; letter-spacing: -.2px; border-radius: 7px; }
html.modo-app .mesa-uso i { display: none; }
html.modo-app .mesa.em-uso .mesa-id .mesa-num { font-size: 21px; }
html.modo-app .mesa-uso { padding: 3px 1px; }
html.modo-app .mesa-uso .mu-nome { max-width: 100%; }
html.modo-app .mesa-uso { text-overflow: clip; }
html.modo-app .mesa-uso .mu-nome { overflow: visible; text-overflow: clip; }

/* ============ Lancar itens: primeiro as categorias ============ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 18px 18px; align-content: start; }
.cat-card {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 130px; padding: 14px 10px; border-radius: 16px; border: 1px solid var(--border); cursor: pointer; text-align: center;
    background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); box-shadow: var(--shadow); color: var(--text);
}
.cat-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.cat-card:active { transform: scale(.97); }
.cat-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 6px 16px var(--brand-soft); }
.cat-card b { font-family: var(--display); font-size: 16px; line-height: 1.15; }
.cat-card small { color: var(--muted); font-size: 12px; }
.cat-qtd { position: absolute; top: 8px; right: 8px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.prod-voltar { align-items: center; justify-content: center; gap: 8px; min-height: 120px; color: var(--muted); font-weight: 700; border-style: dashed; background: var(--bg2); }
.prod-voltar i { font-size: 22px; }

/* no app (celular): 3 categorias por linha */
html.modo-app .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 10px 90px; }
html.modo-app .cat-card { min-height: 104px; padding: 10px 4px; border-radius: 14px; gap: 4px; }
html.modo-app .cat-ico { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
html.modo-app .cat-card b { font-size: 13.5px; }
html.modo-app .cat-card small { font-size: 11px; }
html.modo-app .prod-voltar { min-height: 0; }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
html.modo-app .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-card b { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
html.modo-app .cat-card b { font-size: 12.5px; letter-spacing: -.2px; }

/* Configuracoes > Cardapio: categorias e itens */
.cd-wrap { display: grid; grid-template-columns: 330px 1fr; gap: 14px; align-items: start; }
.cd-lista { padding: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 65vh; overflow-y: auto; }
.cd-cat { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.cd-cat:hover { background: var(--bg2); }
.cd-cat.on { background: var(--brand-soft); border-color: var(--brand); }
.cd-cat.off { opacity: .55; }
.cd-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cd-nome { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cd-nome b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-nome small { color: var(--muted); font-size: 12px; }
.cd-acoes { display: flex; gap: 0; }
.cd-acoes .btn { padding: 5px 7px; }
.cd-preco { width: 100px; text-align: right; font-weight: 700; }
.cd-mover { width: auto; max-width: 160px; padding: 6px 8px; font-size: 13px; }
@media (max-width: 900px) { .cd-wrap { grid-template-columns: 1fr; } .cd-lista { max-height: none; } }

/* ============ Combos e promocoes ============ */
.promo-lista { display: flex; flex-direction: column; gap: 10px; }
.promo-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.promo-card.off { opacity: .55; }
.promo-foto { width: 64px; height: 64px; border-radius: 12px; background: var(--brand-soft) center/cover no-repeat; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.promo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.promo-info b { font-family: var(--display); font-size: 16px; }
.promo-info small { color: var(--muted); font-size: 12px; }
.promo-preco { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; }
.promo-preco s { color: var(--muted); font-size: 12px; }
.promo-preco b { font-family: var(--display); font-size: 20px; color: var(--green); }
.promo-preco small { color: var(--green); font-size: 11px; font-weight: 700; }
.promo-acoes { display: flex; align-items: center; gap: 4px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.cat-card.cat-promo { background: linear-gradient(150deg, #f59e0b, #ea1d2c); border-color: transparent; color: #fff; }
.cat-card.cat-promo .cat-ico { background: rgba(255, 255, 255, .22); box-shadow: none; }
.cat-card.cat-promo small { color: rgba(255, 255, 255, .9); }
.chip-promo { border-color: #f59e0b; color: #d97706; }
.chip-promo.active { background: linear-gradient(90deg, #f59e0b, #ea1d2c); color: #fff; border-color: transparent; }
.prod { position: relative; }
.prod-oferta { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b inset; }
.selo-oferta { position: absolute; top: 6px; left: 6px; z-index: 1; background: linear-gradient(90deg, #f59e0b, #ea1d2c); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; letter-spacing: .4px; }
.prod-combo { color: var(--muted); font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) { .promo-card { flex-wrap: wrap; } .promo-preco { align-items: flex-start; } }

.cd-prod.oferta { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b inset; }

/* A receber */
.rc-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 0 18px 18px; align-content: start; }
.rc-wrap > .empty, .rc-wrap > .nav-section { grid-column: 1 / -1; }
.rc-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid #f59e0b; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.rc-card.rc-mesa { border-left-color: var(--brand); }
.rc-topo { display: flex; align-items: center; gap: 10px; }
.rc-num { font-family: var(--display); font-size: 20px; font-weight: 800; }
.rc-nome { font-weight: 700; font-size: 15px; }
.rc-nome i { color: var(--muted); }
.rc-itens { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-rodape { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 4px; }
.rc-valor { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--amber-text); }
html.modo-app .rc-wrap { grid-template-columns: 1fr; padding: 0 10px 20px; }

/* botoes do carrinho nunca passam da margem (texto quebra em vez de sair) */
.ed-carrinho { min-width: 0; overflow: hidden; }
.ed-acts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ed-acts > * { min-width: 0; }
.ed-acts .btn { white-space: normal; line-height: 1.15; text-align: center; padding-left: 10px; padding-right: 10px; }
.ed-acts .btn.lg { font-size: 15px; }

/* WhatsApp */
.wa-topo { display: flex; align-items: center; gap: 14px; }
.wa-logo { width: 58px; height: 58px; border-radius: 16px; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.wa-qrs { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; text-align: center; }
.wa-qrs small { display: block; margin-top: 6px; color: var(--muted); font-weight: 600; }
.wa-previa { background: #0b141a; border-radius: 12px; padding: 14px; color: #e9edef; }
html:not(.escuro) .wa-previa { background: #efeae2; color: #111b21; }
.wa-balao { margin-top: 8px; max-width: 420px; background: #005c4b; color: #e9edef; padding: 10px 12px; border-radius: 10px 10px 10px 2px; line-height: 1.45; font-size: 14px; }
html:not(.escuro) .wa-balao { background: #fff; color: #111b21; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.nav-item i.fa-brands { color: #25d366; }
