:root {
    --brand:      #db2777;
    --brand-dark: #9d174d;
}
* { box-sizing: border-box; }
body {
    font-family: system-ui, sans-serif;
    background: #f4f6fa;
    margin: 0;
    padding: 2rem;
    color: #222;
}
main {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow-x: auto;
}
h1 { margin-top: 0; }
code { background: #eef; padding: 2px 6px; border-radius: 4px; }
a { color: var(--brand); }

.topbar {
    background: #1e293b;
    color: #fff;
    padding: .8rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: -2rem -2rem 2rem;
}
.topbar nav { display: flex; gap: 1.2rem; flex: 1; align-items: center; }
.topbar nav a { color: #cbd5e1; text-decoration: none; }
.topbar nav a:hover { color: #fff; }
.topbar nav .user { margin-left: auto; font-size: .9rem; }
.topbar nav .user a { color: #93c5fd; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
th { background: #f1f5f9; }
tr:hover td { background: #fafbfc; }

td .btn-sm + .btn-sm,
td form + .btn-sm,
td .btn-sm + form,
td form + form { margin-left: .25rem; }
td form { display: inline-block; }
td:last-child { white-space: nowrap; }

.btn {
    display: inline-block;
    padding: .5rem 1rem;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    font-size: .9rem;
}
.btn:hover { background: var(--brand-dark); }
.btn-sm  { padding: .3rem .7rem; font-size: .8rem; }
.btn-gray  { background: #6b7280; }
.btn-red   { background: #dc2626; }
.btn-green { background: #16a34a; }
.btn-whats { background: #25d366; }
.btn-whats:hover { background: #1ebe5a; }
.btn[disabled],
.btn:disabled {
    background: #cbd5e1 !important;
    cursor: not-allowed;
    opacity: .9;
}

/* Coluna de ações na tabela de pedidos — separa os botões com gap */
.td-acoes { white-space: nowrap; }
.td-acoes form { display: inline-block; }
.td-acoes > * { margin-right: .25rem; vertical-align: middle; }
.td-acoes > *:last-child { margin-right: 0; }

/* ===== Forma de pagamento no checkout ===== */
.forma-pagamento {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: .5rem;
}
.forma-pagamento-opcao {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .8rem;
    align-items: start;
    padding: .9rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}
.forma-pagamento-opcao:hover { border-color: #fca5a5; background: #fdf2f8; }
.forma-pagamento-opcao input[type="radio"] {
    grid-row: 1 / span 2;
    align-self: center;
    transform: scale(1.2);
    accent-color: #db2777;
}
.forma-pagamento-opcao input[type="radio"]:checked + .forma-pagamento-titulo { color: #db2777; }
.forma-pagamento-opcao:has(input[type="radio"]:checked) {
    border-color: #db2777;
    background: #fdf2f8;
}
.forma-pagamento-titulo {
    font-weight: 600;
    font-size: 1.05rem;
    color: #1f2937;
}
.forma-pagamento-titulo small { font-weight: normal; color: #64748b; font-size: .85rem; }
.forma-pagamento-desc {
    color: #64748b;
    font-size: .85rem;
    margin-top: .15rem;
}

/* ===== Tela de pagamento PIX ===== */
.pix-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0 1.5rem;
}
.pix-info code {
    background: #f1f5f9;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .95rem;
}
.pix-copia {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.pix-copia textarea {
    width: 100%;
    padding: .6rem;
    font-family: monospace;
    font-size: .8rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    resize: none;
    word-break: break-all;
    color: #1f2937;
}
.pix-copia button { align-self: flex-start; }
.pix-qr {
    align-self: start;
    padding: .6rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
}
.pix-qr img { display: block; max-width: 100%; height: auto; }
.pix-acoes {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin: 1rem 0;
}
.pix-acoes h2 { margin-top: 0; color: #92400e; }
.pix-acoes .btn-acao,
.pix-acoes .btn { margin-right: .5rem; margin-top: .3rem; }
.pix-acoes form { display: inline-block; }

@media (max-width: 700px) {
    .pix-card { grid-template-columns: 1fr; }
    .pix-qr   { justify-self: center; }
}
.btn-white {
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--brand);
}
.btn-white:hover { background: #fdf2f8; color: var(--brand-dark); }

.badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    background: #e5e7eb;
    color: #374151;
}
.badge-on  { background: #dcfce7; color: #166534; }
.badge-off { background: #fee2e2; color: #991b1b; }
.badge-low { background: #fef3c7; color: #92400e; }

input, textarea, select {
    width: 100%;
    padding: .55rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}
.flash      { padding: .8rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.flash-ok   { background: #dcfce7; color: #166534; }
.flash-erro { background: #fee2e2; color: #991b1b; }

.topbar-cliente { background: var(--brand); }
.topbar-cliente nav a:hover { color: #fff; }

.cart-count {
    background: #f59e0b;
    color: #1f2937;
    font-size: .7rem;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 4px;
    font-weight: bold;
}

.nav-badge {
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 4px;
    font-weight: bold;
    display: inline-block;
    min-width: 18px;
    text-align: center;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadein .25s ease;
}
@keyframes fadein {
    from { opacity: 0; } to { opacity: 1; }
}
.modal-card {
    background: #fff;
    padding: 1.8rem 2rem;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,.3);
    max-width: 500px;
    width: 100%;
    text-align: left;
    animation: pop .3s ease;
}
@keyframes pop {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.modal-item {
    padding: .8rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.modal-item:last-of-type { border-bottom: 0; }
.modal-item h2 { color: var(--brand-dark); font-size: 1.3rem; }

.toast-novo-pedido {
    position: fixed;
    top: 18px;
    right: 18px;
    background: var(--brand);
    color: #fff;
    padding: 1rem 1.3rem;
    border-radius: 8px;
    box-shadow: 0 6px 22px rgba(0,0,0,.18);
    font-weight: 600;
    z-index: 9999;
    max-width: 340px;
    animation: slidein .35s ease;
}
@keyframes slidein {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.config-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    margin: 1.2rem 0;
}
.kpi-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.kpi-card .kpi-label {
    font-size: .75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.kpi-card .kpi-valor {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--brand-dark);
}
.kpi-card-ok    { background: #ecfdf5; border-color: #a7f3d0; }
.kpi-card-ok .kpi-valor { color: #047857; }
.kpi-card-erro  { background: #fef2f2; border-color: #fecaca; }
.kpi-card-erro .kpi-valor { color: #b91c1c; }
.kpi-card-aviso { background: #fef3c7; border-color: #fcd34d; }
.kpi-card-aviso .kpi-valor { color: #92400e; }
.config-box h2 {
    margin-top: 0;
    color: var(--brand-dark);
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: .4rem;
}

.card-encomenda {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
    background: #fff;
}
.card-encomenda.card-destaque {
    border-color: var(--brand);
    box-shadow: 0 4px 12px rgba(219,39,119,.18);
}

/* Estados de urgência por data de entrega */
.card-encomenda.atrasada {
    border-color: #dc2626;
    border-width: 2px;
    background: #fef2f2;
    box-shadow: 0 4px 12px rgba(220, 38, 38, .18);
}
.card-encomenda.hoje {
    border-color: #ea580c;
    border-width: 2px;
    background: #fff7ed;
    box-shadow: 0 4px 12px rgba(234, 88, 12, .15);
}
.card-encomenda.urgente {
    border-color: #f59e0b;
    background: #fffbeb;
}
.card-encomenda.finalizada {
    opacity: .65;
    background: #f9fafb;
}

.urgencia-tag {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-left: .5rem;
    color: #fff;
    vertical-align: middle;
}
.urgencia-atrasada { background: #dc2626; }
.urgencia-hoje     { background: #ea580c; }
.urgencia-urgente  { background: #f59e0b; }

/* Botões rápidos de ação nas encomendas */
.enc-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .8rem 0 .2rem;
}
.btn-acao {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: filter .12s, transform .05s;
}
.btn-acao:hover  { filter: brightness(1.08); }
.btn-acao:active { transform: translateY(1px); }
.btn-acao-verde { background: #16a34a; }
.btn-acao-azul  { background: #2563eb; }
.btn-acao-roxo  { background: #7c3aed; }
.btn-acao-whats {
    background: #25d366;
    text-decoration: none;
}
.btn-acao-whats:hover { color: #fff; filter: brightness(1.08); }
.btn-acao:disabled,
.btn-acao[disabled] {
    background: #cbd5e1;
    cursor: not-allowed;
    filter: none;
    opacity: .8;
}
.btn-acao:disabled:hover,
.btn-acao[disabled]:hover { filter: none; transform: none; }
.btn-acao-cancelar {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    margin-left: auto;
}
.btn-acao-cancelar:hover { background: #fee2e2; filter: none; }

/* "Mais opções" recolhido */
.enc-mais-opcoes {
    margin-top: .8rem;
    border-top: 1px dashed #e5e7eb;
    padding-top: .6rem;
}
.enc-mais-opcoes summary {
    cursor: pointer;
    color: #64748b;
    font-size: .85rem;
    user-select: none;
    list-style: none;
    padding: .25rem 0;
}
.enc-mais-opcoes summary::-webkit-details-marker { display: none; }
.enc-mais-opcoes summary::before {
    content: '▸ ';
    color: #94a3b8;
    margin-right: .15rem;
}
.enc-mais-opcoes[open] summary::before {
    content: '▾ ';
}
.enc-mais-opcoes summary:hover { color: #1f2937; }
.enc-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: .5rem;
}

/* ─────────── Wizard de encomenda ─────────── */
.passos-indicador {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 1.2rem 0 2rem;
    justify-content: center;
}
.passo-bola {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
    font-weight: bold;
    font-size: .95rem;
    transition: background .2s, color .2s;
}
.passo-bola.atual { background: var(--brand); color: #fff; }
.passo-bola.feito { background: var(--brand-dark); color: #fff; }
.passo-linha { flex: 0 1 60px; height: 2px; background: #e5e7eb; }

.passo { background: #fff; }
.passo h2 { margin-top: 0; color: var(--brand-dark); }

.opcoes-cards {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin: 1rem 0;
}
.opcao-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1 1 180px;
    min-height: 110px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    background: #fff;
}
.opcao-card:hover { border-color: var(--brand); background: #fdf2f8; }
.opcao-card input[type=radio],
.opcao-card input[type=checkbox] { display: none; }
.opcao-card:has(input:checked) {
    border-color: var(--brand);
    background: #fdf2f8;
    box-shadow: 0 2px 8px rgba(219,39,119,.18);
}
.opcao-card-pequena { min-height: 60px; flex: 1 1 130px; }
.opcao-nome { font-weight: 600; font-size: 1.05rem; }
.opcao-preco { color: var(--brand); font-weight: bold; margin-top: .3rem; }

.lista-recheios {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}
.opcao-radio {
    display: block;
    padding: .4rem 0;
    cursor: pointer;
}
.opcao-radio input { margin-right: .5rem; }

.passo-botoes {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.passo-botoes .proximo,
.passo-botoes #link-whatsapp { margin-left: auto; }

.resumo-pedido dl {
    background: #fdf2f8;
    border: 1px solid #f3d4e3;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}
.resumo-pedido dt {
    font-weight: 600;
    color: #6b7280;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: .6rem;
}
.resumo-pedido dt:first-child { margin-top: 0; }
.resumo-pedido dd {
    margin: .1rem 0 0;
    font-size: 1.1rem;
    color: var(--brand-dark);
    font-weight: 500;
}

.encomenda-card {
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.encomenda-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.encomenda-card h3 { color: var(--brand-dark); }
.encomenda-card-detalhe h3 { color: var(--brand-dark); }

.encomenda-card .product-media,
.encomenda-card-detalhe .product-media {
    aspect-ratio: 1 / 1;
    max-height: none;
}
.encomenda-card,
.encomenda-card-detalhe {
    min-height: 0;
}

/*
 * Grid de encomendas — flexbox que se adapta à quantidade de cards:
 * sempre centralizado, cards crescem para preencher o espaço quando há poucos
 * e se mantêm em tamanho consistente quando há muitos.
 */
.encomenda-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1rem;
}
.encomenda-grid > .product-card {
    flex: 1 1 280px;
    max-width: 480px;
    min-width: 260px;
}

.cat-tabs {
    display: flex;
    gap: .3rem;
    margin: 1rem 0 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}
.cat-tab {
    padding: .7rem 1.4rem;
    text-decoration: none;
    color: #6b7280;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.cat-tab:hover { color: var(--brand); }
.cat-tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}
.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.product-card h3 {
    font-size: 1rem;
    margin: 0 0 .3rem;
}
.product-card .sku  { color: #6b7280; font-size: .75rem; }
.product-card .preco {
    color: var(--brand);
    font-size: 1.3rem;
    font-weight: bold;
    margin: .5rem 0;
}
.product-card .desc { color: #4b5563; font-size: .85rem; flex: 1; }
.product-card form { margin-top: .8rem; display: flex; gap: .4rem; }
.product-card input[type=number] { width: 70px; }

.product-card { position: relative; }
.product-card.is-best { border: 2px solid var(--brand); }
.badge-best {
    position: absolute;
    top: .5rem;
    left: .5rem;
    background: var(--brand);
    color: #fff;
    font-size: .7rem;
    font-weight: bold;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 2px 6px rgba(219,39,119,.3);
    z-index: 1;
}

.product-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 160px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: .5rem;
    background: #f3f4f6;
}
.grid-fatias .product-media,
.grid-delicias .product-media {
    aspect-ratio: 1 / 1;
    max-height: 260px;
}
.product-card .product-img,
.product-card .product-img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: .85rem;
    transition: transform .3s ease;
}
.product-card:hover .product-img,
.product-card:hover .product-img-placeholder {
    transform: scale(1.08);
}

.thumb-32 {
    width: 36px; height: 36px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}
.thumb-32-placeholder {
    width: 36px; height: 36px;
    background: #f3f4f6;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}

.qty-form { display: inline-flex; gap: .3rem; align-items: center; }
.qty-form input { width: 70px; }

/* KPI cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}
.kpi-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.2rem;
}
.kpi-card .label { color: #64748b; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.kpi-card .value { color: #0f172a; font-size: 1.6rem; font-weight: bold; margin-top: .3rem; }
.kpi-card.kpi-green .value { color: #15803d; }
.kpi-card.kpi-blue  .value { color: #1d4ed8; }

/* Filtro de período */
.filtro-periodo {
    display: flex;
    gap: 1rem;
    align-items: end;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.filtro-periodo label { font-size: .85rem; color: #475569; }
.filtro-periodo input { width: 160px; padding: .4rem; }
.filtro-periodo .btn { white-space: nowrap; }

/* Gráfico CSS de barras */
.chart-wrap {
    display: flex;
    align-items: stretch;
    margin: 1.2rem 0 2.5rem;
}
.chart-yaxis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 24px 0;
    margin-right: .4rem;
    font-size: .7rem;
    color: #64748b;
    min-width: 60px;
    height: 200px;
    line-height: 1;
    box-sizing: content-box;
}
.bars {
    flex: 1;
    display: flex;
    align-items: end;
    gap: 4px;
    height: 200px;
    border-bottom: 1px solid #cbd5e1;
    border-left:   1px solid #cbd5e1;
    padding: 24px .5rem 24px .5rem;
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent calc(25% - 1px),
            #e2e8f0 calc(25% - 1px),
            #e2e8f0 25%
        ) center 24px / 100% 200px no-repeat,
        #fafbfc;
    box-sizing: content-box;
    position: relative;
}
.bar {
    background: #db2777;
    min-width: 28px;
    max-width: 80px;
    flex: 1;
    border-radius: 3px 3px 0 0;
    position: relative;
    cursor: default;
    transition: background .15s;
}
.bar:hover { background: #be185d; }
.bar-value {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: .7rem;
    color: #be185d;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 2px;
    pointer-events: none;
}
.bar:hover .bar-value { opacity: 0; }
.bar .bar-tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 4px;
    z-index: 2;
}
.bar:hover .bar-tip { opacity: 1; }
.bar-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: .65rem;
    color: #64748b;
    margin-top: 4px;
    white-space: nowrap;
}

/* ========== Layout público (login / cadastro / setup) ========== */
body.public {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}
body.public main {
    max-width: 440px;
    width: 100%;
    margin: 0;
    padding: 2.5rem;
    box-shadow: 0 12px 32px rgba(0,0,0,.08);
    position: relative;
    z-index: 1;
}

/* Decorações de fundo (bolos, cookies) */
.bg-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.bg-decorations .deco {
    position: absolute;
    opacity: .35;
    filter: drop-shadow(0 4px 8px rgba(157,23,77,.08));
}
.deco-1  { top: 5%;    left: 4%;    transform: rotate(-12deg); }
.deco-2  { top: 8%;    right: 5%;   transform: rotate(15deg); }
.deco-3  { bottom: 8%; left: 6%;    transform: rotate(8deg); }
.deco-4  { bottom: 4%; right: 4%;   transform: rotate(-10deg); }
.deco-5  { top: 45%;   left: 3%;    transform: rotate(-20deg); }
.deco-6  { top: 38%;   right: 4%;   transform: rotate(15deg); }
.deco-7  { bottom: 35%; right: 8%;  transform: rotate(-8deg); }
.deco-8  { top: 3%;    left: 30%;   transform: rotate(-5deg); }
.deco-9  { bottom: 30%; left: 12%;  transform: rotate(10deg); }
.deco-10 { top: 30%;   left: 32%;   transform: rotate(-15deg); }
.deco-11 { bottom: 5%;  left: 45%;  transform: rotate(8deg); }

@media (max-width: 700px) {
    .bg-decorations .deco { opacity: .25; }
    .deco-5, .deco-6, .deco-7, .deco-9, .deco-10 { display: none; }
}
@media (max-width: 480px) {
    .deco-1, .deco-2, .deco-3, .deco-4, .deco-8, .deco-11 {
        width: 55px !important; height: 55px !important;
    }
    .deco-8, .deco-11 { display: none; }
}
.brand-block {
    text-align: center;
    margin-bottom: 2rem;
}

/* Logo: imagem ou fallback (círculo com inicial) */
.app-logo { display: inline-block; vertical-align: middle; }
img.app-logo { object-fit: contain; }

.app-logo-lg {
    width: 110px; height: 110px;
    margin: 0 auto .8rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(219,39,119,.25);
}
img.app-logo-lg { object-fit: cover; }

.app-logo-sm {
    width: 36px; height: 36px;
    margin-right: .6rem;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}
img.app-logo-sm { object-fit: cover; }

/* Fallback (sem arquivo de imagem) */
.app-logo-fallback {
    background: var(--brand);
    color: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: serif;
}
.app-logo-lg.app-logo-fallback {
    font-size: 2.4rem;
}
.app-logo-sm.app-logo-fallback {
    font-size: 1.1rem;
    padding: 0;
}

/* Marca (logo + nome) na topbar */
.brand-mark { display: inline-flex; align-items: center; }
.brand-mark .brand-text { font-weight: bold; }
.brand-block h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--brand-dark);
}
.brand-block .slogan {
    color: #6b7280;
    font-size: .9rem;
    margin-top: .3rem;
}

.public-actions {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-size: .9rem;
}
.public-actions a { color: var(--brand); font-weight: 500; }
.public-back { display:block; text-align:center; margin-top:1.5rem; color:#9ca3af; font-size:.85rem; }

.public-contact {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #f3e8f1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
    font-size: .85rem;
}
.public-contact .contact-link {
    color: #6b7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.public-contact .contact-link:hover { color: var(--brand); }

.feira-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}
.feira-item {
    background: #fdf2f8;
    border-left: 4px solid var(--brand);
    border-radius: 6px;
    padding: .9rem 1rem;
}
.feira-item .feira-dia {
    display: block;
    color: var(--brand-dark);
    font-weight: bold;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .5px;
}
.feira-item .feira-local {
    display: block;
    color: #1f2937;
    font-size: 1rem;
    margin-top: .15rem;
}
.feira-item .feira-horario {
    color: #9d174d;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    margin-left: .25rem;
}

/* WhatsApp flutuante */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(37,211,102,.35);
    z-index: 9999;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.whatsapp-float:hover {
    background: #1ebe5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,211,102,.45);
}
.whatsapp-float svg { display: block; }

@media (max-width: 480px) {
    .whatsapp-float { width: 52px; height: 52px; bottom: 16px; right: 16px; }
    .whatsapp-float svg { width: 26px; height: 26px; }
}

/* ===== Menus dropdown do admin (topbar) ===== */
.topbar nav .nav-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.topbar nav .nav-trigger {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
.topbar nav .nav-trigger:hover,
.topbar nav .nav-group:hover .nav-trigger,
.topbar nav .nav-group:focus-within .nav-trigger {
    color: #fff;
}
.topbar nav .nav-caret {
    font-size: .85em;
    line-height: 1;
}
.topbar nav .nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0 0 6px 6px;
    padding: .35rem 0;
    min-width: 210px;
    z-index: 100;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.topbar nav .nav-group:hover .nav-dropdown,
.topbar nav .nav-group:focus-within .nav-dropdown {
    display: block;
}
.topbar nav .nav-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 1rem;
    color: #cbd5e1;
    white-space: nowrap;
}
.topbar nav .nav-dropdown a:hover {
    background: #334155;
    color: #fff;
}
.topbar nav .nav-dropdown .nav-badge {
    margin-left: .5rem;
}

/* ===== Grade da aba Encomenda — só dentro do admin (não vaza pro catálogo público) ===== */
body.admin .encomenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin: 1rem 0;
}
body.admin .encomenda-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
body.admin .encomenda-card-foto {
    aspect-ratio: 4/3;
    background: #f3f4f6;
    overflow: hidden;
}
body.admin .encomenda-card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
body.admin .encomenda-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: .9rem;
}
body.admin .encomenda-card-nome {
    padding: .7rem .8rem .2rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    word-break: break-word;
}
body.admin .encomenda-card-acoes {
    display: flex;
    gap: .5rem;
    padding: .6rem .8rem .8rem;
}
body.admin .encomenda-card-acoes .btn {
    flex: 1;
    text-align: center;
}

/* ===== Dashboard admin (Início) ===== */
.dash-titulo {
    margin: 0 0 .2rem;
    color: #db2777;
}
.dash-data {
    margin: 0 0 1.5rem;
    color: #64748b;
    font-size: .95rem;
}
.dash-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.dash-card h2 {
    margin: 0 0 1rem;
    font-size: .9rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
}
.dash-alertas.tem-alerta {
    border-color: #fbbf24;
    background: #fffbeb;
}
.dash-tudoOk {
    color: #15803d;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}
.dash-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.dash-lista a {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .8rem 1rem;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #1f2937;
    text-decoration: none;
    transition: all .15s;
}
.dash-lista a:hover {
    background: #fef3c7;
    border-color: #fbbf24;
}
.dash-emoji { font-size: 1.4rem; flex-shrink: 0; }
.dash-lista strong {
    color: #b45309;
    font-size: 1.1rem;
    margin-right: .15rem;
}
.dash-seta {
    margin-left: auto;
    color: #94a3b8;
    font-size: 1.1rem;
}
.dash-hoje-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.dash-hoje-grid > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem 1.2rem;
}
.dash-hoje-label {
    color: #64748b;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.dash-hoje-valor {
    font-size: 1.6rem;
    font-weight: bold;
    color: #db2777;
    margin-top: .2rem;
}
.dash-pedidos {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.dash-pedidos a {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: .7rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1f2937;
    text-decoration: none;
    transition: background .15s;
}
.dash-pedidos a:hover { background: #f1f5f9; }
.dash-cliente { font-weight: 600; }
.dash-pedido-valor { color: #15803d; font-weight: 600; }
.dash-pedido-data { color: #64748b; font-size: .85rem; }
.dash-pedido-status {
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.dash-status-pendente  { background: #fef3c7; color: #92400e; }
.dash-status-pago      { background: #dcfce7; color: #166534; }
.dash-status-enviado   { background: #dbeafe; color: #1e40af; }
.dash-status-entregue  { background: #e0e7ff; color: #3730a3; }
.dash-status-cancelado { background: #fee2e2; color: #991b1b; }
.dash-vazio { color: #64748b; margin: 0; }

@media (max-width: 600px) {
    .dash-pedidos a {
        grid-template-columns: 1fr;
        gap: .3rem;
    }
}

/* ===== Comparativo mês a mês (Fase 1 do combo Inteligência) ===== */
.cmp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.cmp-card h3 {
    margin: 0 0 .8rem 0;
    color: var(--brand-dark, #9d174d);
    font-size: 1.05rem;
}
.cmp-tabela {
    width: 100%;
    border-collapse: collapse;
}
.cmp-tabela th,
.cmp-tabela td {
    padding: .45rem .6rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}
.cmp-tabela th {
    font-size: .72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}
.cmp-tabela tr:last-child td { border-bottom: none; }
.cmp-tabela td:first-child {
    color: #475569;
    font-size: .9rem;
}
.cmp-tabela td:nth-child(2) { color: #94a3b8; font-variant-numeric: tabular-nums; }
.cmp-tabela td:nth-child(3) { color: #111827; font-variant-numeric: tabular-nums; }

.cmp-var {
    font-weight: 600;
    font-size: .85rem;
    padding: .15rem .45rem;
    border-radius: 6px;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}
.cmp-sobe  { background: #dcfce7; color: #166534; }
.cmp-desce { background: #fee2e2; color: #991b1b; }
.cmp-igual { background: #f1f5f9; color: #475569; }
.cmp-novo  { background: #fef3c7; color: #92400e; }

.cmp-insight {
    margin: .8rem 0 0 0;
    padding: .6rem .8rem;
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: .9rem;
    color: #7c2d12;
}

/* Versão compacta usada no dashboard (menos padding, fonte menor). */
.cmp-card.cmp-compact {
    padding: .9rem 1rem;
}
.cmp-card.cmp-compact h3 { font-size: .95rem; }
.cmp-card.cmp-compact .cmp-tabela td { padding: .35rem .5rem; }

@media (max-width: 600px) {
    .cmp-tabela th:nth-child(2),
    .cmp-tabela td:nth-child(2) { display: none; }
}

/* ===== Top produtos com lucro (Fase 2 do combo Inteligência) ===== */
.ordenar-bar {
    margin: .8rem 0;
    padding: .5rem .8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .9rem;
}
.ordenar-bar select {
    margin-left: .5rem;
    padding: .25rem .5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.tabela-lucro {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.tabela-lucro th,
.tabela-lucro td {
    padding: .55rem .6rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}
.tabela-lucro th {
    font-size: .72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #f9fafb;
}
.tabela-lucro tbody tr:hover { background: #fafafa; }
.tabela-lucro td { font-variant-numeric: tabular-nums; }
.produto-sku {
    display: block;
    font-size: .75rem;
    color: #94a3b8;
    margin-top: .15rem;
}

.val-positivo { color: #166534; font-weight: 600; }
.val-negativo { color: #991b1b; font-weight: 600; }
.val-aviso    { color: #92400e; font-weight: 600; }
.linha-prejuizo { background: #fef2f2 !important; }
.linha-prejuizo:hover { background: #fee2e2 !important; }

.sem-receita {
    color: #64748b;
    font-style: italic;
    font-size: .85rem;
}
.sem-receita a {
    color: var(--brand-color, #db2777);
    text-decoration: underline;
}
.badge-sem-receita {
    display: inline-block;
    padding: .15rem .5rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: .5rem;
    font-style: normal;
    letter-spacing: .5px;
}

@media (max-width: 700px) {
    .tabela-lucro th:nth-child(4),
    .tabela-lucro td:nth-child(4),
    .tabela-lucro th:nth-child(5),
    .tabela-lucro td:nth-child(5) { display: none; }
}

/* ===== DRE — Resultado do mês (Fase 3 do combo Inteligência) ===== */
.dre-card {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 60%);
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin: 1rem 0;
    box-shadow: 0 1px 3px rgba(245, 158, 11, .12);
}
.dre-card h3 {
    margin: 0 0 .9rem 0;
    color: #92400e;
    font-size: 1.05rem;
}
.dre-parcial {
    font-weight: normal;
    font-size: .8rem;
    color: #b45309;
    margin-left: .4rem;
}

.dre-tabela {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.dre-tabela td {
    padding: .35rem .5rem;
    border-bottom: 1px solid #fef3c7;
}
.dre-num { text-align: right; }

.dre-linha td { font-size: .95rem; color: #78350f; }
.dre-detalhe td { font-size: .8rem; color: #a16207; padding-left: 1.5rem; }
.dre-detalhe td.dre-num { padding-left: .5rem; }
.dre-saida td { color: #991b1b; }

.dre-resultado td {
    font-size: 1.15rem;
    padding-top: .8rem;
    padding-bottom: .8rem;
    border-bottom: none;
    border-top: 2px solid #fcd34d;
}
.dre-positivo td { color: #166534; }
.dre-negativo td { color: #991b1b; }
.dre-margem {
    font-size: .85rem;
    font-weight: normal;
    color: #6b7280;
    margin-left: .3rem;
}

.dre-vazio { color: #92400e; font-style: italic; margin: 0; }
.dre-aviso {
    margin: .6rem 0 0 0;
    padding: .5rem .7rem;
    background: rgba(255, 255, 255, .6);
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: .82rem;
    color: #78350f;
}
.dre-aviso a { color: #b45309; text-decoration: underline; }

.dre-seletor {
    margin: 1rem 0;
    padding: .6rem .9rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .9rem;
}
.dre-seletor select {
    margin-left: .4rem;
    padding: .25rem .5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* ===== Tela admin/despesas.php ===== */
.despesa-resumo {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.5rem 0;
    display: flex;
    align-items: baseline;
    gap: .8rem;
    flex-wrap: wrap;
}
.despesa-resumo-label {
    font-size: .75rem;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.despesa-resumo-valor {
    font-size: 1.6rem;
    font-weight: bold;
    color: #047857;
    font-variant-numeric: tabular-nums;
}
.despesa-resumo-sub {
    color: #6b7280;
    font-size: .85rem;
}

.despesa-form-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0 2rem 0;
}
.despesa-form-card h2 {
    margin: 0 0 .8rem 0;
    font-size: 1rem;
    color: var(--brand-dark, #9d174d);
}
.despesa-form {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: .8rem 1rem;
}
.despesa-form label {
    display: block;
    font-size: .8rem;
    color: #475569;
    font-weight: 600;
}
.despesa-form input[type="text"] {
    width: 100%;
    margin-top: .25rem;
    padding: .45rem .6rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: .95rem;
    box-sizing: border-box;
}

.linha-inativa { opacity: .5; }
.linha-inativa td { background: #f9fafb; }

@media (max-width: 600px) {
    .despesa-form { grid-template-columns: 1fr; }
}

/* ===== Agenda da semana (Combo Operacional Fase 1) ===== */
.agenda-destaque {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
    margin: 1rem 0 1.2rem 0;
    background: linear-gradient(135deg, #fdf2f8 0%, #fff 100%);
    border: 1px solid #fbcfe8;
    border-radius: 10px;
    padding: 1rem 1.3rem;
    box-shadow: 0 1px 3px rgba(219, 39, 119, .08);
}
.agenda-destaque-hoje,
.agenda-destaque-proxima {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.agenda-destaque-proxima { border-left: 1px solid #fbcfe8; padding-left: 1rem; }
.agenda-destaque-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #be185d;
    font-weight: 700;
}
.agenda-destaque-data {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}
.agenda-destaque-info {
    font-size: .95rem;
    color: #475569;
}
.agenda-destaque-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .3rem 0;
    border-radius: 4px;
    transition: transform .1s ease;
}
.agenda-destaque-link:hover { transform: translateX(3px); }
.agenda-destaque-quando {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-color, #db2777);
}
.agenda-destaque-cliente {
    font-size: .95rem;
    color: #1e293b;
    font-weight: 600;
}
.agenda-destaque-bolo {
    font-size: .85rem;
    color: #64748b;
}
.agenda-destaque-vazio .agenda-destaque-info { font-style: italic; color: #94a3b8; }

@media (max-width: 700px) {
    .agenda-destaque { grid-template-columns: 1fr; }
    .agenda-destaque-proxima { border-left: none; border-top: 1px solid #fbcfe8; padding-left: 0; padding-top: .8rem; }
}

.agenda-nav {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1rem 0 1.2rem 0;
    flex-wrap: wrap;
}
.agenda-range {
    flex: 1;
    text-align: center;
    font-size: 1.05rem;
    color: #475569;
}

.agenda-grid {
    display: grid;
    grid-template-columns: var(--cols, repeat(7, 1fr));
    gap: .6rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.agenda-dia {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .6rem;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.agenda-dia.eh-hoje {
    border-color: var(--brand-color, #db2777);
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(219, 39, 119, .12);
}
.agenda-dia.eh-passado { opacity: .55; }
.agenda-dia.eh-livre {
    min-height: auto;
    padding: .5rem .35rem;
    background: #fafafa;
    border-color: #f1f5f9;
}
.agenda-dia.eh-livre .agenda-dia-header { border-bottom: none; padding-bottom: 0; }
.agenda-dia.eh-livre .agenda-dia-nome { font-size: .72rem; }
.agenda-dia.eh-livre .agenda-dia-data { font-size: .72rem; }
.agenda-dia.eh-livre .agenda-vazio { font-size: .72rem; padding: .3rem 0; }

/* Cor de fundo por carga (intensidade do dia) */
.carga-livre   { background: #fff; }
.carga-leve    { background: #f0fdf4; border-color: #bbf7d0; }
.carga-media   { background: #fffbeb; border-color: #fde68a; }
.carga-pesada  { background: #fff7ed; border-color: #fdba74; }
.carga-critica { background: #fef2f2; border-color: #fca5a5; }

.agenda-dia-header {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding-bottom: .35rem;
}
.agenda-dia-nome {
    font-weight: bold;
    text-transform: uppercase;
    font-size: .8rem;
    color: #475569;
    letter-spacing: .5px;
}
.agenda-dia-data { color: #94a3b8; font-size: .8rem; }
.agenda-badge-hoje {
    margin-left: auto;
    font-size: .65rem;
    background: var(--brand-color, #db2777);
    color: #fff;
    padding: .1rem .4rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.agenda-vazio {
    color: #cbd5e1;
    font-size: .85rem;
    font-style: italic;
    padding: .8rem 0;
    text-align: center;
}

.agenda-dia-resumo {
    font-size: .8rem;
    color: #475569;
}
.agenda-carga-tag {
    display: inline-block;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .1rem .4rem;
    border-radius: 4px;
    font-weight: 600;
}
.carga-tag-leve    { background: #bbf7d0; color: #166534; }
.carga-tag-media   { background: #fde68a; color: #92400e; }
.carga-tag-pesada  { background: #fdba74; color: #9a3412; }
.carga-tag-critica { background: #fca5a5; color: #991b1b; }

.agenda-cards {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.enc-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .15rem .5rem;
    padding: .4rem .5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #94a3b8;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    font-size: .78rem;
    transition: transform .1s ease;
}
.enc-card:hover { transform: translateX(2px); border-left-width: 5px; }

.enc-hora {
    grid-column: 1;
    font-weight: bold;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}
.enc-cliente {
    grid-column: 2;
    color: #1e293b;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.enc-massa {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: .72rem;
    display: flex;
    justify-content: space-between;
    gap: .3rem;
}
.enc-kg { color: #475569; font-weight: 600; }

.enc-status {
    grid-column: 1 / -1;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .1rem .35rem;
    border-radius: 3px;
    text-align: center;
    margin-top: .15rem;
}
.enc-status-aguardando   { background: #fef3c7; color: #92400e; }
.enc-status-confirmada   { background: #dbeafe; color: #1e40af; }
.enc-status-em_preparo   { background: #fed7aa; color: #9a3412; }
.enc-status-saiu_entrega { background: #bbf7d0; color: #166534; }
.enc-status-entregue     { background: #e5e7eb; color: #475569; }
.enc-status-cancelada    { background: #fee2e2; color: #991b1b; }

/* Borda esquerda por status */
.enc-card.status-aguardando   { border-left-color: #f59e0b; }
.enc-card.status-confirmada   { border-left-color: #3b82f6; }
.enc-card.status-em_preparo   { border-left-color: #f97316; }
.enc-card.status-saiu_entrega { border-left-color: #22c55e; }
.enc-card.status-entregue     { border-left-color: #94a3b8; }
.enc-card.status-cancelada    { border-left-color: #ef4444; }

.enc-cancelada {
    opacity: .55;
    text-decoration: line-through;
}
.enc-cancelada .enc-status { text-decoration: none; }

.agenda-resumo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.agenda-resumo-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.2rem;
}
.agenda-resumo-label {
    font-size: .72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .4rem;
}
.agenda-resumo-valor { font-size: 1.1rem; color: #1e293b; }
.agenda-resumo-sub { color: #64748b; font-size: .85rem; margin-top: .4rem; }
.agenda-massas {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .8rem;
}
.agenda-massas li { color: #475569; font-size: .9rem; }

@media (max-width: 900px) {
    .agenda-grid { grid-template-columns: repeat(2, 1fr); }
    .agenda-resumo { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .agenda-grid { grid-template-columns: 1fr; }
}
