html, body { background: #F4F6F8; }

/* Carregando o sistema */
.carregando { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #13294B; }
.carregando .bola {
    width: 56px; height: 56px; border-radius: 50%; background: #E8830C;
    animation: quicar .6s ease-in-out infinite alternate;
}
@keyframes quicar { from { transform: translateY(-24px); } to { transform: translateY(24px); } }

#blazor-error-ui { background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* Tabelas: números alinhados à direita */
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mud-table-row.linha-clicavel { cursor: pointer; }

.dias-semana { display: flex; flex-wrap: wrap; gap: 4px; }
.dias-semana .mud-button-root { min-width: 46px; }

.tela-login {
    min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.tela-login.equipe { min-height: 100vh; background: linear-gradient(135deg, #13294B 0%, #1d3d6b 60%, #E8830C 140%); }

.gestao-logo { height: 34px; width: auto; border-radius: 4px; background: #fff; padding: 2px; }

@media print {
    .mud-appbar, .mud-drawer, .nao-imprimir, .cliente-abas { display: none !important; }
    .mud-main-content { padding-top: 0 !important; margin-left: 0 !important; }
}

/* ---------- Site / app do cliente ---------- */
.cliente-barra { padding-top: env(safe-area-inset-top); }
.cliente-marca { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 500; font-size: 1.1rem; }
.cliente-marca img { height: 38px; width: auto; background: #fff; border-radius: 6px; padding: 2px 4px; }
.cliente-conteudo {
    max-width: 1100px; margin: 0 auto;
    padding: calc(60px + env(safe-area-inset-top)) 12px calc(84px + env(safe-area-inset-bottom));
}
@media (min-width: 600px) { .cliente-conteudo { padding-bottom: 32px; } }

.cliente-abas {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; background: #fff; border-top: 1px solid #e3e6ea;
    padding-bottom: env(safe-area-inset-bottom); justify-content: space-around;
}
.cliente-abas a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0 8px; color: #6b7280; text-decoration: none; font-size: .72rem; }
.cliente-abas a.ativo { color: #E8830C; }

.capa {
    border-radius: 16px; padding: 28px 20px; color: #fff; text-align: center;
    background: linear-gradient(135deg, #13294B 0%, #1d3d6b 70%, #2c5a96 100%);
}
.capa img { max-height: 120px; max-width: 80%; background: #fff; border-radius: 12px; padding: 8px 12px; }

/* Datas em fila (rolagem lateral no celular) */
.datas { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.data-chip {
    flex: 0 0 auto; width: 62px; padding: 6px 0; border-radius: 10px; border: 1px solid #d6dbe1; background: #fff;
    display: flex; flex-direction: column; align-items: center; cursor: pointer; user-select: none; line-height: 1.15;
}
.data-chip small { font-size: .68rem; color: #6b7280; text-transform: uppercase; }
.data-chip b { font-size: 1.15rem; }
.data-chip.ativa { background: #13294B; border-color: #13294B; color: #fff; }
.data-chip.ativa small { color: #c9d3e0; }

/* Grade de horários: quadras nas linhas, horas nas colunas */
.grade { overflow-x: auto; background: #fff; border-radius: 12px; border: 1px solid #e3e6ea; }
.grade table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.grade th, .grade td { padding: 4px; text-align: center; border-bottom: 1px solid #eef0f3; }
.grade th.quadra, .grade td.quadra {
    position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding-left: 10px; min-width: 110px; max-width: 150px;
    font-weight: 600; border-right: 1px solid #eef0f3;
}
.grade thead th { position: sticky; top: 0; z-index: 1; background: #fff; }
.grade .hora-titulo { display: inline-block; min-width: 54px; padding: 4px 6px; border-radius: 8px; background: #E8830C; color: #fff; font-weight: 600; font-size: .85rem; }
.grade .marca-cor { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

.horario {
    width: 70px; min-height: 52px; border-radius: 8px; border: 1px solid transparent; font-size: .78rem; line-height: 1.15;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; user-select: none;
}
.horario.livre { background: #eaf6e4; border-color: #b9dfa8; color: #23571a; cursor: pointer; }
.horario.livre:hover { background: #d8efcd; }
.horario.selecionado { background: #E8830C; border-color: #c96e05; color: #fff; }
.horario.ocupado, .horario.passado, .horario.fechado { background: #f1f2f4; color: #9aa1ab; }
.horario.bloqueado { background: repeating-linear-gradient(45deg, #f6f0e6, #f6f0e6 6px, #efe6d6 6px, #efe6d6 12px); color: #8a6d3b; }
.horario.minha { background: #13294B; color: #fff; }
.horario .promo { font-size: .64rem; font-weight: 700; color: #b45309; }
.horario.selecionado .promo { color: #fff; }

.resumo-reserva {
    position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 12px;
    border-radius: 14px; background: #13294B; color: #fff; padding: 12px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
@media (min-width: 600px) { .resumo-reserva { bottom: 12px; } }

.cartao-reserva { padding: 14px; border-radius: 12px; background: #fff; border: 1px solid #e3e6ea; margin-bottom: 10px; }
.qr-pix { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: 12px; }
.copia-cola { word-break: break-all; font-family: monospace; font-size: .75rem; background: #f4f6f8; padding: 8px; border-radius: 8px; max-height: 90px; overflow: auto; }

/* ---------- Agenda da recepção ---------- */
.agenda { overflow: auto; background: #fff; border-radius: 10px; border: 1px solid #e3e6ea; max-height: calc(100vh - 210px); }
.agenda table { border-collapse: separate; border-spacing: 0; width: 100%; }
.agenda th, .agenda td { border-bottom: 1px solid #eef0f3; border-right: 1px solid #f3f4f6; padding: 2px; vertical-align: top; }
.agenda thead th { position: sticky; top: 0; z-index: 3; background: #13294B; color: #fff; padding: 8px 6px; font-weight: 500; min-width: 140px; }
.agenda td.hora, .agenda th.hora { position: sticky; left: 0; z-index: 2; background: #fff; font-weight: 600; text-align: center; width: 64px; min-width: 64px; }
.agenda thead th.hora { z-index: 4; background: #13294B; }
.celula { min-height: 44px; border-radius: 6px; padding: 4px 6px; font-size: .8rem; line-height: 1.2; cursor: pointer; height: 100%; }
.celula.livre { color: #b0b7c1; }
.celula.livre:hover { background: #eaf6e4; color: #23571a; }
.celula.fechado { background: #f6f7f9; cursor: default; }
.celula.bloqueado { background: repeating-linear-gradient(45deg, #f6f0e6, #f6f0e6 6px, #efe6d6 6px, #efe6d6 12px); color: #8a6d3b; }
.celula.reserva { color: #fff; }
.celula.reserva.pago { background: #3E9B3A; }
.celula.reserva.a_pagar { background: #E8830C; }
.celula.reserva.parcial { background: #c2410c; }
.celula.reserva.aguardando { background: #7c8698; }
.celula.reserva.continua { opacity: .82; }
.celula b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; align-items: center; }
.legenda span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; background: var(--c); }

/* ---------- Bar (PDV) ---------- */
.pdv { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .pdv { grid-template-columns: 1fr; } }
.pdv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pdv-produto {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 10px; border-radius: 10px;
    border: 1px solid #e3e6ea; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.pdv-produto:hover { border-color: #E8830C; background: #fff8f0; }
.pdv-produto:active { transform: scale(.98); }
.pdv-produto b { font-size: .92rem; line-height: 1.15; }
.pdv-produto span { color: #E8830C; font-weight: 700; }
.pdv-produto small { color: #6b7280; font-size: .72rem; }
.pdv-produto.sem-estoque { opacity: .55; }
.pdv-carrinho { position: sticky; top: 64px; }
.pdv-item { display: flex; align-items: center; gap: 2px; padding: 4px 0; border-bottom: 1px solid #f1f2f4; font-size: .9rem; }
.formas-pagto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* ---------- Checklist ---------- */
.foto-botao {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; cursor: pointer;
    border: 2px dashed #E8830C; color: #c96e05; font-weight: 500; background: #fff;
}
.foto-miniatura { position: relative; }
.foto-miniatura img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid #ddd; }
.foto-miniatura button {
    position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none;
    background: #c62828; color: #fff; font-size: 12px; line-height: 22px; padding: 0; cursor: pointer;
}
.foto-checklist { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #e3e6ea; display: block; }

/* ---------- Gráficos (uma cor só; texto sempre na cor do texto) ---------- */
.barras { display: flex; flex-direction: column; gap: 6px; }
.barras-vazio { color: #9aa1ab; font-size: .85rem; padding: 12px 0; }
.barra-linha { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; align-items: center; gap: 8px; font-size: .82rem; }
.barra-rotulo { color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-trilho { display: flex; align-items: center; gap: 6px; min-width: 0; }
.barra { height: 14px; background: #E8830C; border-radius: 0 4px 4px 0; min-width: 2px; }
.barra-valor { color: #4b5563; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .78rem; }
.barra-linha:hover .barra { background: #c96e05; }

.colunas { font-size: .72rem; color: #6b7280; }
.colunas-area { display: grid; grid-template-columns: auto 1fr; gap: 6px; height: 160px; }
.colunas-escala { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-variant-numeric: tabular-nums; }
.colunas-plot {
    display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; align-items: end; height: 100%;
    border-bottom: 1px solid #d1d5db; background: linear-gradient(#eef0f3 1px, transparent 1px) 0 0 / 100% 50%;
}
.coluna-celula { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.coluna { width: 100%; background: #E8830C; border-radius: 4px 4px 0 0; min-height: 1px; }
.coluna-celula:hover .coluna { background: #c96e05; }
.colunas-eixo { display: grid; grid-template-columns: repeat(var(--n), 1fr); margin-left: 44px; gap: 2px; text-align: center; white-space: nowrap; }
.painel-cartao { height: 100%; }
