:root { --azul: #1d3557; --azul2: #274b7a; --destaque: #e9c46a; }
body { background: #f4f6fa; font-size: .95rem; }
.sidebar { width: 240px; min-height: 100vh; background: var(--azul); color: #fff; position: sticky; top: 0; }
.sidebar .marca { color: #fff; font-weight: 700; font-size: 1.1rem; }
.sidebar .marca i { color: var(--destaque); }
.sidebar .nav-link { color: rgba(255,255,255,.8); display: flex; align-items: center; border-radius: 8px; margin-bottom: 2px; }
.sidebar .nav-link:hover { background: var(--azul2); color: #fff; }
.sidebar .nav-link.active { background: var(--destaque); color: var(--azul); font-weight: 600; }
.conteudo { min-width: 0; }
.card { border: 0; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kpi .valor { font-size: 1.6rem; font-weight: 700; }
.kpi i { font-size: 1.8rem; opacity: .35; }
.table > :not(caption) > * > * { vertical-align: middle; }
.foto-produto { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #e9ecef; }

/* Login */
.tela-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--azul), #457b9d); }

/* Chat */
.chat-wrap { height: calc(100vh - 140px); min-height: 480px; }
.chat-lista { overflow-y: auto; border-right: 1px solid #e5e7eb; }
.chat-lista .item { padding: .75rem 1rem; border-bottom: 1px solid #f0f0f0; cursor: pointer; display: block; color: inherit; text-decoration: none; }
.chat-lista .item:hover, .chat-lista .item.ativo { background: #eef3fb; }
.chat-msgs { overflow-y: auto; background: #efeae2; padding: 1rem; }
.bolha { max-width: 75%; padding: .5rem .75rem; border-radius: 10px; margin-bottom: .5rem; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.bolha.entrada { background: #fff; }
.bolha.saida { background: #d9fdd3; margin-left: auto; }
.bolha.saida.atendente { background: #cfe2ff; }
.bolha .meta { font-size: .7rem; color: #6c757d; text-align: right; margin-top: 2px; }

@media (max-width: 767px) {
    .sidebar { position: fixed; z-index: 1040; left: -260px; transition: left .2s; }
    .sidebar.aberta { left: 0; }
    .chat-wrap { height: auto; }
}

/* Painel do superadmin */
.sidebar-admin { background: #212529; }
.sidebar-admin .marca i { color: #20c997; }
.sidebar-admin .nav-link.active { background: #20c997; color: #212529; }
.faixa-acesso { background: #212529; color: #fff; }
.faixa-acesso a { color: #20c997; }
