/* =====================================================================
   SISLAN - Design System próprio (sem dependência de CDN externo)
   Mobile-first, moderno, leve.
   ===================================================================== */

:root {
    --color-primary: #16a34a;
    --color-primary-dark: #15803d;
    --color-primary-light: #dcfce7;
    --color-danger: #dc2626;
    --color-danger-light: #fee2e2;
    --color-warning: #d97706;
    --color-warning-light: #fef3c7;
    --color-info: #2563eb;
    --color-info-light: #dbeafe;

    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;

    --sidebar-width: 250px;
    --topbar-height: 60px;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 .75rem; }

/* ---------- Layout autenticado ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #111827;
    color: #e5e7eb;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 40;
    transition: transform .2s ease;
}
.sidebar-brand {
    padding: 1.1rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap: .5rem;
}
.sidebar-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); }
.sidebar nav { padding: .75rem; }
.sidebar .nav-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .75rem; border-radius: 8px;
    color: #cbd5e1; font-size: .92rem; font-weight: 500;
    margin-bottom: 2px;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sidebar .nav-link.active { background: var(--color-primary); color: #fff; }
.sidebar .nav-section { margin-top: .5rem; padding: .5rem .75rem .25rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }

.main-area { margin-left: var(--sidebar-width); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky; top: 0; z-index: 30;
}
.topbar .menu-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-text); }
.topbar .user-chip { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.topbar .avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary);
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}

.content { padding: 1.5rem; max-width: 1400px; width: 100%; margin: 0 auto; }

.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39; }

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .topbar .menu-toggle { display: block; }
    .overlay.open { display: block; }
    .content { padding: 1rem; }
}

/* ---------- Layout em módulos separados (sem menu lateral) ---------- */
.topbar-modules { padding: 0 1.25rem; flex-wrap: wrap; height: auto; min-height: var(--topbar-height); }
.brand-mini { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem; color: var(--color-text); }
.brand-mini .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); display: inline-block; }
.brand-mini:hover { text-decoration: none; }
.content-modules { padding-top: 1.5rem; }

.module-launcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}
.module-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); text-decoration: none; }
.module-card .icon { font-size: 2.1rem; line-height: 1; }
.module-card .label { font-weight: 700; font-size: .9rem; color: var(--color-text); }
.module-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); font-weight: 700; margin: 1.75rem 0 .75rem; }
.module-section-title:first-child { margin-top: 0; }

@media (max-width: 600px) {
    .module-launcher-grid { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
    .module-card { padding: 1rem .5rem; border-radius: 12px; }
    .module-card .icon { font-size: 1.7rem; }
    .module-card .label { font-size: .78rem; }
    .topbar-modules .user-chip > div { display: none; }
}

/* ---------- Componentes ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }

.grid { display: grid; gap: 1rem; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; } }

.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.stat-card .label { font-size: .8rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; margin-top: .25rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem 1.1rem; border-radius: 8px; border: 1px solid transparent;
    font-weight: 600; font-size: .9rem; cursor: pointer; background: var(--color-surface);
    color: var(--color-text); transition: filter .15s ease;
}
.btn:hover { filter: brightness(0.97); text-decoration: none; }
.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-danger { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-green { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-red { background: var(--color-danger-light); color: var(--color-danger); }
.badge-yellow { background: var(--color-warning-light); color: var(--color-warning); }
.badge-blue { background: var(--color-info-light); color: var(--color-info); }
.badge-gray { background: #f3f4f6; color: #4b5563; }

.form-group { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: var(--color-text); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=tel],
input[type=date], input[type=search], input[type=color], select, textarea {
    width: 100%; padding: .6rem .75rem; border: 1px solid var(--color-border); border-radius: 8px;
    font-size: .92rem; background: #fff; color: var(--color-text); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.helper-text { font-size: .78rem; color: var(--color-text-muted); margin-top: .25rem; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table th { text-align: left; padding: .65rem .75rem; background: #f9fafb; font-weight: 700; color: var(--color-text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--color-border); }
table td { padding: .65rem .75rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
table tr:hover td { background: #fafafa; }
.table-wrap { overflow-x: auto; }

.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; font-weight: 500; }
.alert-success { background: var(--color-primary-light); color: var(--color-primary-dark); }
.alert-error { background: var(--color-danger-light); color: var(--color-danger); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #111827, #1f2937); padding: 1rem; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 2rem; box-shadow: var(--shadow-lg); }
.login-card .brand { text-align: center; margin-bottom: 1.5rem; }
.login-card .brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--color-primary); display: inline-block; margin-right: 6px; }

/* ---------- PDV ---------- */
.pdv-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .pdv-layout { grid-template-columns: 1fr; } }
.pdv-toolbar { margin-bottom: 1rem; }
.pdv-toolbar input[type=search] { margin-bottom: .6rem; }
.category-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; }
.category-tab {
    flex-shrink: 0; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--color-border);
    background: #fff; font-size: .82rem; font-weight: 600; color: var(--color-text-muted); cursor: pointer;
}
.category-tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.product-tile {
    background: #fff; border: 1px solid var(--color-border); border-radius: 10px; padding: .9rem;
    cursor: pointer; text-align: left; transition: box-shadow .15s ease, border-color .15s ease;
}
.product-tile:hover { box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.product-tile .price { color: var(--color-primary-dark); font-weight: 800; margin-top: .35rem; }
.product-tile-img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; margin-bottom: .5rem; }
.product-ingredients {
    font-size: .76rem; color: var(--color-text-muted); margin-top: .3rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Cardápio (gestão de produtos) ---------- */
.menu-admin-toolbar { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; align-items: center; }
.menu-admin-search { flex: 1; min-width: 220px; }
.menu-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.menu-admin-card {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden;
    box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
}
.menu-admin-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.menu-admin-card-img { width: 100%; height: 140px; object-fit: cover; background: #f1f5f9; }
.menu-admin-card-img-placeholder {
    width: 100%; height: 140px; display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; font-size: 2.2rem; color: #cbd5e1;
}
.menu-admin-card-body { padding: .9rem 1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.menu-admin-card-title { font-weight: 700; font-size: .98rem; line-height: 1.3; }
.menu-admin-card-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.menu-admin-card-price { margin-top: .1rem; font-weight: 800; color: var(--color-primary-dark); font-size: 1.05rem; }
.menu-admin-card-price .old-price { text-decoration: line-through; color: var(--color-text-muted); font-weight: 500; font-size: .8rem; margin-right: .35rem; }
.menu-admin-card-actions { display: flex; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--color-border); background: var(--color-bg); }
.menu-admin-card-actions form { flex: 1; display: flex; }
.menu-admin-card-actions .btn { width: 100%; }
.menu-admin-empty { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.menu-admin-empty-icon { font-size: 2.4rem; margin-bottom: .5rem; }

.btn-close-cart {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--color-border);
    background: var(--color-surface); color: var(--color-text-muted); font-size: 1.1rem;
    line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
.btn-close-cart:hover { background: var(--color-danger-light); color: var(--color-danger); border-color: var(--color-danger); }
.customer-badge {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--color-primary-light); color: var(--color-primary-dark);
    border-radius: 8px; padding: .5rem .75rem; font-size: .87rem; margin-bottom: .75rem;
}
.customer-badge a { color: var(--color-primary-dark); font-weight: 600; font-size: .8rem; }
.cart-sticky { position: sticky; top: calc(var(--topbar-height) + 1rem); }
.cart-item { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem 0; border-bottom: 1px dashed var(--color-border); font-size: .87rem; }
.cart-item-info { cursor: pointer; flex: 1; }
.cart-item-edit-hint { opacity: .35; font-size: .78rem; }
.cart-item-info:hover .cart-item-edit-hint { opacity: .8; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; padding-top: .75rem; }

/* Pedidos de balcão em espera */
.held-orders-list { display: flex; flex-direction: column; gap: .5rem; }
.held-order-item {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    background: var(--color-warning-light); border-radius: 8px; padding: .6rem .8rem;
}
.held-order-item .btn-sm { white-space: nowrap; }

/* Movimentações do caixa (vendas, sangrias, suprimentos) */
.cash-movements-list { display: flex; flex-direction: column; gap: .5rem; max-height: 420px; overflow-y: auto; }
.cash-movement-item {
    display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .7rem; border-radius: 8px;
    background: var(--color-bg-alt, #f7f8fa); border-left: 3px solid var(--color-border);
}
.cash-movement-venda { border-left-color: var(--color-primary); }
.cash-movement-suprimento { border-left-color: var(--orders-entregue, #8b5cf6); }
.cash-movement-sangria { border-left-color: var(--color-danger); }
.cash-movement-icon { font-size: 1rem; line-height: 1.4; }
.cash-movement-info { flex: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.cash-movement-title { font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.cash-movement-desc { font-size: .74rem; color: var(--color-text-muted); overflow-wrap: anywhere; }
.cash-movement-amount { font-size: .88rem; white-space: nowrap; }
.cash-movement-sangria .cash-movement-amount { color: var(--color-danger); }
.cash-movement-venda .cash-movement-amount, .cash-movement-suprimento .cash-movement-amount { color: var(--color-primary-dark, #15803d); }

/* Seleção de mesa (lançar pedido do balcão em uma mesa) */
.table-select-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: .6rem; max-height: 340px; overflow-y: auto; margin: .75rem 0;
}
.table-select-item {
    display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
    border: 1px solid var(--color-border); border-radius: 10px; padding: .7rem .8rem;
    background: var(--color-surface); cursor: pointer; text-align: left;
}
.table-select-item:hover { border-color: var(--color-primary); box-shadow: var(--shadow); }
.table-select-item.occupied { background: var(--color-danger-light); }

/* ---------- Módulo Pedidos (acompanhamento esperando/preparo/entregue/finalizado) ---------- */
:root {
    --orders-esperando: #f59e0b;
    --orders-preparo: #3b82f6;
    --orders-aguardando-motoboy: #ec4899;
    --orders-saiu-para-entrega: #f97316;
    --orders-entregue: #8b5cf6;
    --orders-finalizado: #16a34a;
}

.orders-summary {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: .9rem; margin-bottom: 1.5rem;
}
@media (max-width: 1200px) { .orders-summary { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .orders-summary { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .orders-summary { grid-template-columns: repeat(2, 1fr); } }
.orders-summary-item {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .25rem;
    border-top: 3px solid var(--color-border); transition: transform .12s ease, box-shadow .12s ease;
}
.orders-summary-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.orders-summary-value { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--color-text); }
.orders-summary-label { font-size: .78rem; color: var(--color-text-muted); font-weight: 600; }
.orders-summary-esperando { border-top-color: var(--orders-esperando); }
.orders-summary-preparo { border-top-color: var(--orders-preparo); }
.orders-summary-aguardando_motoboy { border-top-color: var(--orders-aguardando-motoboy); }
.orders-summary-saiu_para_entrega { border-top-color: var(--orders-saiu-para-entrega); }
.orders-summary-entregue { border-top-color: var(--orders-entregue); }
.orders-summary-finalizado { border-top-color: var(--orders-finalizado); }

/* As 6 colunas sempre ficam lado a lado, encolhendo pra caber na largura do monitor
   (em vez de quebrar em várias linhas) — pensado pra ficar num monitor/TV fixo no
   balcão/cozinha, onde é melhor ver tudo de uma vez do que rolar a página. */
.orders-columns { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(.4rem, 1vw, 1.1rem); align-items: start; }
@media (max-width: 700px) {
    /* Só em tela muito estreita (celular) a rolagem horizontal entra como alternativa,
       porque 6 colunas legíveis não cabem fisicamente numa tela desse tamanho. */
    .orders-columns { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; padding-bottom: .5rem; }
}

.orders-column {
    background: linear-gradient(180deg, rgba(0,0,0,.015), transparent 60px), var(--color-bg-alt, #f7f8fa);
    border-radius: 16px; padding: clamp(.55rem, 1.2vw, 1rem); min-height: 180px; border: 1px solid var(--color-border);
    min-width: 0; /* deixa a coluna encolher dentro do grid em vez de estourar a largura */
}
.orders-column-header {
    display: flex; align-items: center; gap: .4rem; font-weight: 800; font-size: clamp(.72rem, 1vw, .95rem);
    padding-bottom: .7rem; margin-bottom: .8rem; border-bottom: 2px solid rgba(0,0,0,.06);
}
.orders-column-icon {
    width: clamp(22px, 2vw, 30px); height: clamp(22px, 2vw, 30px); border-radius: 9px; display: flex; align-items: center; justify-content: center;
    font-size: clamp(.75rem, 1vw, 1rem); background: rgba(0,0,0,.05); flex: none;
}
.orders-column-title { min-width: 0; overflow-wrap: break-word; }
.orders-column-title { flex: 1; }
.orders-column-count {
    background: rgba(0,0,0,.08); border-radius: 999px; min-width: 24px; height: 24px; padding: 0 .5rem;
    display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800;
}
.orders-col-esperando .orders-column-icon { background: #fef3c7; }
.orders-col-esperando .orders-column-count { background: #fef3c7; color: #92400e; }
.orders-col-preparo .orders-column-icon { background: #dbeafe; }
.orders-col-preparo .orders-column-count { background: #dbeafe; color: #1e40af; }
.orders-col-aguardando-motoboy .orders-column-icon { background: #fce7f3; }
.orders-col-aguardando-motoboy .orders-column-count { background: #fce7f3; color: #9d174d; }
.orders-col-saiu-para-entrega .orders-column-icon { background: #ffedd5; }
.orders-col-saiu-para-entrega .orders-column-count { background: #ffedd5; color: #9a3412; }
.orders-col-entregue .orders-column-icon { background: #ede9fe; }
.orders-col-entregue .orders-column-count { background: #ede9fe; color: #5b21b6; }
.orders-col-finalizado .orders-column-icon { background: #dcfce7; }
.orders-col-finalizado .orders-column-count { background: #dcfce7; color: #15803d; }

.orders-cards { display: flex; flex-direction: column; gap: .75rem; }
.orders-empty {
    display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2rem 0;
    color: var(--color-text-muted); font-size: .85rem;
}
.orders-empty-icon { font-size: 1.6rem; opacity: .5; }

.orders-card {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px;
    padding: clamp(.6rem, 1.2vw, .9rem) clamp(.65rem, 1.2vw, 1rem); box-shadow: var(--shadow);
    transition: transform .12s ease, box-shadow .12s ease; border-left: 4px solid var(--color-border);
    min-width: 0;
}
.orders-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.orders-col-esperando .orders-card { border-left-color: var(--orders-esperando); }
.orders-col-preparo .orders-card { border-left-color: var(--orders-preparo); }
.orders-col-aguardando-motoboy .orders-card { border-left-color: var(--orders-aguardando-motoboy); }
.orders-col-saiu-para-entrega .orders-card { border-left-color: var(--orders-saiu-para-entrega); }
.orders-col-entregue .orders-card { border-left-color: var(--orders-entregue); }
.orders-col-finalizado .orders-card { border-left-color: var(--orders-finalizado); opacity: .82; }

.orders-card-title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin-bottom: .55rem; }
.orders-card-title strong { letter-spacing: -.01em; }
.orders-card-icon {
    font-size: 1rem; width: 28px; height: 28px; border-radius: 9px; flex: none;
    display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.045);
}
.orders-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.orders-time-pill {
    background: rgba(0,0,0,.05); color: var(--color-text-muted); font-size: .72rem; font-weight: 700;
    padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; flex: none;
}

.badge-tag {
    display: inline-flex; align-items: center; font-size: .66rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; margin: 0;
}
.badge-tag-balcao { background: var(--color-warning-light); color: #92400e; }
.badge-tag-mesa { background: var(--color-info-light); color: #1e40af; }
.badge-tag-delivery { background: #f3e8ff; color: #7e22ce; }

.orders-items { list-style: none; margin: 0; padding: .55rem .65rem; background: rgba(0,0,0,.025); border-radius: 8px; font-size: .86rem; color: var(--color-text); }
.orders-items li { padding: .22rem 0; border-bottom: 1px dashed rgba(0,0,0,.08); display: flex; gap: .4rem; }
.orders-items li:last-child { border-bottom: none; }
.orders-item-qty { color: var(--color-primary-dark); font-weight: 800; flex: none; }

.orders-card-footer {
    display: flex; align-items: center; justify-content: space-between; margin-top: .8rem;
    padding-top: .7rem; border-top: 1px solid rgba(0,0,0,.06);
}
.orders-total { font-size: 1.1rem; font-weight: 800; color: var(--color-text); }

/* Pulso sutil nas colunas "vivas" (esperando / em preparo / aguardando motoboy), reforçando que precisam de ação */
.orders-col-esperando .orders-column-icon,
.orders-col-preparo .orders-column-icon,
.orders-col-aguardando-motoboy .orders-column-icon { position: relative; }
.orders-col-esperando .orders-column-icon::after,
.orders-col-preparo .orders-column-icon::after,
.orders-col-aguardando-motoboy .orders-column-icon::after {
    content: ''; position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 0 rgba(0,0,0,.4); animation: orders-pulse 1.8s infinite;
}
.orders-col-esperando .orders-column-icon::after { color: var(--orders-esperando); }
.orders-col-preparo .orders-column-icon::after { color: var(--orders-preparo); }
.orders-col-aguardando-motoboy .orders-column-icon::after { color: var(--orders-aguardando-motoboy); }
@keyframes orders-pulse {
    0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    70% { box-shadow: 0 0 0 6px transparent; opacity: 0; }
    100% { box-shadow: 0 0 0 0 transparent; opacity: 0; }
}

/* ---------- Mesas ---------- */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.table-tile { border-radius: 12px; padding: 1rem; text-align: center; border: 2px solid var(--color-border); background: #fff; cursor: pointer; }
.table-tile.livre { border-color: var(--color-primary); }
.table-tile.ocupada { border-color: var(--color-danger); background: #fff7f7; }
.table-tile .status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.table-tile.livre .status-dot { background: var(--color-primary); }
.table-tile.ocupada .status-dot { background: var(--color-danger); }
.table-tile-edit {
    position: absolute; top: .4rem; right: .4rem; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--color-border); background: #fff; cursor: pointer; font-size: .8rem;
    display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; z-index: 2;
}
.table-tile-edit:hover { background: var(--color-bg-alt, #f2f3f5); }

/* ---------- Kanban Delivery ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .kanban { grid-template-columns: 1fr; } }
.kanban-col { background: #eef1f4; border-radius: 10px; padding: .75rem; min-height: 120px; }
.kanban-col h4 { font-size: .82rem; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: .6rem; }
.kanban-card { background: #fff; border-radius: 8px; padding: .75rem; margin-bottom: .6rem; box-shadow: var(--shadow); font-size: .87rem; }

/* ---------- Cardápio público ---------- */
.public-header {
    background: linear-gradient(155deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.28) 100%), var(--color-primary);
    color: #fff; padding: 2.5rem 1.25rem 4.5rem; text-align: center; position: relative; overflow: hidden;
}
.public-header::before {
    content: ''; position: absolute; inset: -40% -10% auto -10%; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,.08); pointer-events: none;
}
.public-logo {
    width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin-bottom: .75rem;
    border: 3px solid rgba(255,255,255,.45); box-shadow: 0 6px 18px rgba(0,0,0,.18); position: relative;
}
.public-logo-placeholder { display: flex; align-items: center; justify-content: center; font-size: 2rem; background: rgba(255,255,255,.15); margin-left: auto; margin-right: auto; }
.public-header h1 { font-size: 1.55rem; margin-bottom: .3rem; letter-spacing: -.01em; position: relative; }
.public-header-subtitle { opacity: .92; font-size: .92rem; position: relative; margin: 0; }

.public-subnav {
    position: sticky; top: 0; z-index: 20; background: var(--color-surface); border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-top: -2.5rem;
}
.public-subnav-inner { max-width: 720px; margin: 0 auto; display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 1rem; }
.public-subnav-item {
    flex: none; padding: .4rem .9rem; border-radius: 999px; background: var(--color-bg); color: var(--color-text);
    font-size: .82rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--color-border); transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.public-subnav-item:hover { text-decoration: none; border-color: var(--color-primary); color: var(--color-primary-dark); }

.public-body { max-width: 720px; margin: -1.5rem auto 6rem; padding: 0 1rem; }
.public-subnav + .public-body { margin-top: 0; }
.category-title {
    margin: 1.75rem 0 .85rem; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em;
    padding-left: .65rem; border-left: 4px solid var(--color-primary); scroll-margin-top: 4.5rem;
}
.menu-item {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 1rem;
    box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; gap: .9rem;
    margin-bottom: .8rem; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.menu-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.menu-item-info { min-width: 0; }
.menu-item .name { font-weight: 700; }
.menu-item .desc {
    color: var(--color-text-muted); font-size: .85rem; margin-top: .25rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.menu-item .price { color: var(--color-primary-dark); font-weight: 800; margin-top: .5rem; font-size: 1rem; }
.menu-item .price .old-price { color: var(--color-text-muted); text-decoration: line-through; font-weight: 500; font-size: .8rem; margin-right: .35rem; }
.menu-item-img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; flex: none; }
.menu-item-img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--color-bg); color: #cbd5e1; }

.floating-cart {
    position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 720px; margin: 0 auto;
    background: linear-gradient(135deg, #111827, #1f2937); color: #fff; padding: 1rem 1.35rem; border-radius: 999px;
    display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lg); cursor: pointer;
    z-index: 50; transition: transform .12s ease;
}
.floating-cart:hover { transform: translateY(-2px); }
.floating-cart-info { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: .4rem; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 60; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } }
.modal { background: #fff; border-radius: 14px 14px 0 0; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 1.25rem; position: relative; }
.modal-close { position: absolute; top: .9rem; right: .9rem; }
@media (min-width: 640px) { .modal { border-radius: 14px; } }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: .85rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Notificação global de pedido novo (Delivery), aparece em cima de qualquer tela */
.sislan-toast-container {
    position: fixed; top: 1rem; right: 1rem; z-index: 9999;
    display: flex; flex-direction: column; gap: .6rem; max-width: 360px;
}
.sislan-toast {
    display: flex; align-items: center; gap: .7rem; background: #fff; border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.18)); border-left: 4px solid var(--color-primary);
    padding: .8rem .9rem; animation: sislan-toast-in .25s ease, sislan-toast-pulse 1.6s ease-in-out infinite;
}
.sislan-toast-icon { font-size: 1.4rem; flex: none; }
.sislan-toast-body { flex: 1; min-width: 0; }
.sislan-toast-close {
    background: none; border: none; font-size: 1.3rem; line-height: 1; cursor: pointer;
    color: var(--color-text-muted); padding: 0 .3rem; flex: none;
}
@keyframes sislan-toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes sislan-toast-pulse {
    0%, 100% { box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.18)), 0 0 0 0 rgba(22,163,74,.35); }
    50% { box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.18)), 0 0 0 6px rgba(22,163,74,0); }
}
@media (max-width: 480px) { .sislan-toast-container { left: 1rem; right: 1rem; max-width: none; } }
