/* LC Bebidas — visual do sistema (sem dependências externas) */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --azul: #2563eb;
    --azul-escuro: #1e40af;
    --verde: #16a34a;
    --vermelho: #dc2626;
    --laranja: #ea580c;
    --amarelo: #f59e0b;
    --roxo: #7c3aed;
    --cinza: #64748b;
    --fundo: #f1f5f9;
    --card: #ffffff;
    --borda: #e2e8f0;
    --texto: #0f172a;
    --sombra: 0 1px 3px rgba(15,23,42,.08), 0 4px 14px rgba(15,23,42,.06);
    --raio: 14px;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--fundo);
    color: var(--texto);
    font-size: 15px;
}

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

/* ================= SIDEBAR ================= */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 235px;
    background: linear-gradient(180deg, #0b1120 0%, #172554 60%, #1e3a8a 100%);
    color: #fff;
    padding: 20px 12px;
    overflow-y: auto;
    z-index: 100;
}
.sidebar .logo {
    font-size: 19px; font-weight: 800;
    padding: 4px 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 14px;
    line-height: 1.25;
    letter-spacing: .3px;
}
.sidebar .logo small {
    display: block; font-weight: 500; font-size: 11.5px;
    opacity: .65; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px;
}
.sidebar a.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    margin-bottom: 3px;
    color: rgba(255,255,255,.78);
    font-size: 14.5px;
    border-radius: 10px;
    transition: background .15s, color .15s, transform .1s;
}
.sidebar a.nav-item:hover {
    background: rgba(255,255,255,.09);
    color: #fff;
    text-decoration: none;
    transform: translateX(2px);
}
.sidebar a.nav-item.ativo {
    background: linear-gradient(90deg, var(--azul) 0%, #3b82f6 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37,99,235,.45);
}
.sidebar .icone { font-size: 18px; width: 24px; text-align: center; }

/* ================= CONTEÚDO ================= */
.conteudo { margin-left: 235px; padding: 26px 30px; min-height: 100vh; }

.topo {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.topo h2 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }

/* ================= CARDS DE RESUMO ================= */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.stat-card {
    flex: 1; min-width: 190px;
    border-radius: var(--raio);
    padding: 20px 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--azul) 0%, var(--azul-escuro) 100%);
    box-shadow: var(--sombra);
}
.stat-card.verde { background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); }
.stat-card.vermelho { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.stat-card.amarelo { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-card.roxo { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.stat-card.cinza-claro {
    background: #fff; color: var(--texto);
    border: 1px solid var(--borda);
}
.stat-card.cinza-claro .rotulo { color: var(--cinza); }
.stat-card .rotulo {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; opacity: .85;
}
.stat-card .valor { font-size: 27px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.stat-card .icone-fundo {
    position: absolute; right: 12px; bottom: 4px;
    font-size: 52px; opacity: .18;
}

/* ================= PAINÉIS ================= */
.painel {
    background: var(--card);
    border-radius: var(--raio);
    padding: 22px 24px;
    box-shadow: var(--sombra);
    margin-bottom: 20px;
    border: 1px solid rgba(226,232,240,.6);
}
.painel h3 {
    font-size: 16px; font-weight: 800; margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fundo);
}

/* ================= TABELAS ================= */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: left; }
th {
    font-size: 11.5px; text-transform: uppercase; color: var(--cinza);
    letter-spacing: .8px; font-weight: 700;
    border-bottom: 2px solid var(--borda);
}
td { border-bottom: 1px solid var(--fundo); }
tbody tr:nth-child(even) td, tr:nth-child(even) td { background: #fafbfe; }
tr:hover td { background: #eff6ff; }
td.num, th.num { text-align: right; }

/* ================= BOTÕES ================= */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(135deg, var(--azul) 0%, var(--azul-escuro) 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37,99,235,.35);
    transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.4); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn.verde { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 2px 6px rgba(22,163,74,.35); }
.btn.vermelho { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 2px 6px rgba(220,38,38,.35); }
.btn.cinza { background: linear-gradient(135deg, #64748b, #475569); box-shadow: 0 2px 6px rgba(100,116,139,.35); }
.btn.claro { background: #eef2f7; color: #334155; box-shadow: none; border: 1px solid var(--borda); }
.btn.pequeno { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn.grande { padding: 15px 24px; font-size: 17px; width: 100%; justify-content: center; }

/* ================= FORMULÁRIOS ================= */
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: #334155; }
input, select, textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--borda);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.campo { margin-bottom: 15px; }
.linha-campos { display: flex; gap: 14px; flex-wrap: wrap; }
.linha-campos .campo { flex: 1; min-width: 140px; }

.bloco-destaque {
    background: #fffbeb;
    border: 1.5px dashed var(--amarelo);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 15px;
}
.bloco-destaque h4 { font-size: 14px; margin-bottom: 10px; color: #92400e; }

.check-linha { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.check-linha input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--azul); }
.check-linha label { margin: 0; font-size: 14.5px; }

/* ================= BADGES / AVISOS ================= */
.badge {
    display: inline-block; padding: 4px 11px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}
.badge.verde { background: #dcfce7; color: #166534; }
.badge.vermelho { background: #fee2e2; color: #991b1b; }
.badge.amarelo { background: #fef3c7; color: #92400e; }
.badge.azul { background: #dbeafe; color: #1e40af; }
.badge.roxo { background: #ede9fe; color: #5b21b6; }
.badge.cinza { background: #f1f5f9; color: #475569; }

.alerta {
    padding: 13px 18px; border-radius: 12px; margin-bottom: 16px;
    font-weight: 600; box-shadow: var(--sombra);
}
.alerta.ok { background: #dcfce7; color: #166534; border-left: 5px solid var(--verde); }
.alerta.erro { background: #fee2e2; color: #991b1b; border-left: 5px solid var(--vermelho); }

/* ================= PDV ================= */
.pdv-grid { display: flex; gap: 18px; align-items: flex-start; }
.pdv-produtos { flex: 1.5; }
.pdv-carrinho { flex: 1; position: sticky; top: 20px; min-width: 320px; }

.cat-filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-filtros button {
    padding: 7px 16px; border-radius: 20px; border: 1.5px solid var(--borda);
    background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 600;
    width: auto; font-family: inherit;
    transition: all .15s;
}
.cat-filtros button:hover { border-color: var(--azul); color: var(--azul); }
.cat-filtros button.ativo {
    background: linear-gradient(135deg, var(--azul), var(--azul-escuro));
    color: #fff; border-color: transparent;
    box-shadow: 0 2px 6px rgba(37,99,235,.35);
}

.grade-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 12px;
    max-height: 64vh;
    overflow-y: auto;
    padding: 2px;
}
.produto-card {
    background: #fff; border: 1.5px solid var(--borda); border-radius: 12px;
    padding: 13px; cursor: pointer;
    transition: box-shadow .15s, border-color .15s, transform .12s;
}
.produto-card:hover {
    box-shadow: 0 6px 16px rgba(37,99,235,.18);
    border-color: var(--azul);
    transform: translateY(-2px);
}
.produto-card .nome { font-weight: 700; font-size: 13.5px; min-height: 36px; line-height: 1.3; }
.produto-card .preco { color: var(--verde); font-weight: 800; font-size: 17px; margin-top: 7px; }
.produto-card .estoque { font-size: 11.5px; color: var(--cinza); margin-top: 3px; }
.produto-card.sem-estoque { opacity: .4; cursor: not-allowed; }
.produto-card.frac { cursor: default; }
.produto-card .botoes-frac { display: flex; gap: 6px; margin-top: 8px; }
.produto-card .botoes-frac button {
    flex: 1; padding: 7px 4px; border-radius: 8px; border: none; cursor: pointer;
    font-size: 12px; font-weight: 700; font-family: inherit; color: #fff;
    transition: transform .1s, opacity .15s;
}
.produto-card .botoes-frac button:hover { opacity: .88; transform: translateY(-1px); }
.produto-card .botoes-frac .b-carteira { background: linear-gradient(135deg, var(--azul), var(--azul-escuro)); }
.produto-card .botoes-frac .b-unidade { background: linear-gradient(135deg, var(--laranja), #c2410c); }

.carrinho-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 0; border-bottom: 1px solid var(--fundo);
}
.carrinho-item .nome { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.carrinho-item .nome small { font-weight: 500; }
.carrinho-item input.qtd { width: 58px; text-align: center; padding: 6px 4px; }
.carrinho-item .sub { width: 85px; text-align: right; font-weight: 800; font-size: 14px; }
.carrinho-item button.remover {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: #fee2e2; color: #991b1b; cursor: pointer; font-weight: 800; font-size: 15px;
    transition: background .15s;
}
.carrinho-item button.remover:hover { background: #fecaca; }

.total-linha { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 15px; }
.total-linha.grande {
    font-size: 24px; font-weight: 800; color: var(--verde);
    border-top: 2px solid var(--fundo); margin-top: 6px; padding-top: 12px;
}
.troco-destaque {
    background: #dcfce7; color: #166534; font-weight: 800; font-size: 16px;
    padding: 10px 14px; border-radius: 10px; margin-top: 8px; text-align: center;
}

/* ================= GRÁFICO DE BARRAS ================= */
.grafico {
    display: flex; align-items: flex-end; gap: 10px;
    height: 150px; padding-top: 10px;
}
.grafico .coluna { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.grafico .valor-barra { font-size: 11px; font-weight: 700; color: var(--cinza); margin-bottom: 4px; }
.grafico .barra-area { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.grafico .barra {
    width: 70%; max-width: 48px;
    background: linear-gradient(180deg, #3b82f6, var(--azul-escuro));
    border-radius: 8px 8px 3px 3px;
    min-height: 3px;
    transition: opacity .15s;
}
.grafico .coluna:hover .barra { opacity: .8; }
.grafico .rotulo-dia { font-size: 11.5px; font-weight: 600; color: var(--cinza); margin-top: 6px; }

/* ================= UTILIDADES ================= */
.texto-cinza { color: var(--cinza); font-size: 13px; }
.mt { margin-top: 16px; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vazio { text-align: center; color: var(--cinza); padding: 34px 0; font-size: 14.5px; }

@media (max-width: 900px) {
    .sidebar { width: 64px; padding: 14px 8px; }
    .sidebar .logo { font-size: 0; padding: 0 0 12px; text-align: center; }
    .sidebar .logo small { display: none; }
    .sidebar a.nav-item { justify-content: center; padding: 12px 0; }
    .sidebar a.nav-item .texto { display: none; }
    .conteudo { margin-left: 64px; padding: 16px; }
    .pdv-grid { flex-direction: column; }
    .pdv-carrinho { position: static; width: 100%; min-width: 0; }
}

/* ================= LOGIN E USUÁRIOS ================= */
body.tela-login {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
    background: linear-gradient(160deg, #0b1120 0%, #172554 55%, #1e3a8a 100%);
}
.caixa-login {
    background: #fff;
    width: 100%; max-width: 400px;
    padding: 32px 30px 28px;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(2, 6, 23, .45);
}
.caixa-login .marca {
    font-size: 23px; font-weight: 800; text-align: center;
    margin-bottom: 22px; letter-spacing: -.3px;
}
.caixa-login .alerta { margin-bottom: 14px; }

/* rodapé do menu lateral: quem está logado, trocar senha e sair */
.rodape-menu {
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.rodape-menu .quem-sou {
    padding: 4px 14px 10px;
    font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3;
}
.rodape-menu .quem-sou small {
    display: block; font-weight: 500; font-size: 11px;
    opacity: .6; text-transform: uppercase; letter-spacing: 1.2px; margin-top: 2px;
}
