.bkc {
	--bkc-vermelho: #D02227;
	--bkc-vermelho-esc: #a91b1f;
	--bkc-verde: #61CE70;
	--bkc-verde-esc: #4cb45b;
	--bkc-borda: #e3e3e3;
	--bkc-zebra: #fafafa;
	--bkc-texto: #222;
	--bkc-sel: #fff4f5;
	font-size: 14px;
	color: var(--bkc-texto);
	margin: 1em 0;
}
.bkc *, .bkc *::before, .bkc *::after { box-sizing: border-box; }
.bkc .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bkc-barra {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	align-items: flex-end;
	margin-bottom: 12px;
}
.bkc-campo { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.bkc-campo select,
.bkc-busca {
	height: 38px;
	padding: 0 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-weight: 400;
}
.bkc-busca { flex: 1 1 200px; min-width: 160px; }

.bkc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	padding: 0 16px;
	border: 1px solid var(--bkc-vermelho);
	border-radius: 4px;
	background: var(--bkc-vermelho);
	color: #fff !important;
	font: inherit;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
}
.bkc-btn:hover { background: var(--bkc-vermelho-esc); border-color: var(--bkc-vermelho-esc); }
.bkc-btn:disabled { opacity: .45; cursor: not-allowed; }
.bkc-btn-sec { background: #fff; color: var(--bkc-vermelho) !important; }
.bkc-btn-sec:hover { background: var(--bkc-sel); }
.bkc-btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }


.bkc-tabela-wrap { overflow-x: auto; border: 1px solid var(--bkc-borda); border-radius: 6px; }
.bkc-tabela { width: 100%; border-collapse: collapse; margin: 0; }
.bkc-tabela th {
	background: var(--bkc-vermelho);
	color: #fff;
	text-align: left;
	font-weight: 600;
	padding: 10px 12px;
	white-space: nowrap;
	border: 0;
}
.bkc-tabela td, .bkc-tabela td * { color: var(--bkc-texto) !important; font-weight: 400; }
.bkc-tabela td { padding: 9px 12px; border: 0; border-top: 1px solid var(--bkc-borda); white-space: nowrap; vertical-align: middle; }
.bkc-tabela tbody tr:nth-child(even) { background: var(--bkc-zebra); }
.bkc-tabela tbody tr.is-sel { background: var(--bkc-sel); }
.bkc-tabela tbody tr.bkc-destaque td:nth-child(2) { font-weight: 700; color: var(--bkc-vermelho) !important; }
.bkc-tabela td .bkc-btn-negociar { color: #fff !important; font-weight: 600; }
.bkc-col-check { width: 36px; text-align: center !important; }
.bkc-check { width: 16px; height: 16px; cursor: pointer; }

.bkc-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.bkc-contagem { color: #666; font-size: 13px; }
.bkc-paginas { display: flex; flex-wrap: wrap; gap: 4px; }
.bkc-pag {
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	cursor: pointer;
}
.bkc-pag.is-ativo { background: var(--bkc-vermelho); border-color: var(--bkc-vermelho); color: #fff; }
.bkc-pag:disabled { opacity: .4; cursor: default; }
.bkc-pag-gap { padding: 0 4px; line-height: 34px; color: #888; }
.bkc-vazio, .bkc-aviso { padding: 14px; background: #f6f6f6; border-radius: 6px; }

/* Desktop: tabela mais compacta, sai da largura de 1140px do tema e a coluna Negociar fica sempre visível. */
@media (min-width: 761px) {
	.bkc-tabela th, .bkc-tabela td { padding-left: 9px; padding-right: 9px; font-size: 13px; }
	.bkc-tabela-wrap {
		width: min(1480px, calc(100vw - 48px));
		max-width: none;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}
	.bkc-tabela th:last-child,
	.bkc-tabela td:last-child {
		position: sticky;
		right: 0;
		z-index: 1;
		box-shadow: -8px 0 8px -8px rgba(0, 0, 0, .25);
	}
	.bkc-tabela th:last-child { background: var(--bkc-vermelho); }
	.bkc-tabela td:last-child { background: #fff; }
	.bkc-tabela tbody tr:nth-child(even) td:last-child { background: var(--bkc-zebra); }
	.bkc-tabela tbody tr.is-sel td:last-child { background: var(--bkc-sel); }
}

/* Celular: cada carta vira um cartão. */
@media (max-width: 760px) {
	.bkc-barra > * { flex: 1 1 100%; }
	.bkc-tabela-wrap { border: 0; overflow: visible; }
	.bkc-tabela thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.bkc-tabela, .bkc-tabela tbody, .bkc-tabela tr, .bkc-tabela td { display: block; width: 100%; }
	.bkc-tabela tr { position: relative; margin-bottom: 12px; border: 1px solid var(--bkc-borda); border-radius: 6px; padding: 8px 12px 10px 44px; background: #fff !important; }
	.bkc-tabela tr[hidden] { display: none; }
	.bkc-tabela tr.is-sel { border-color: var(--bkc-vermelho); background: var(--bkc-sel) !important; }
	.bkc-tabela td { border: 0; padding: 3px 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; }
	.bkc-tabela td::before { content: attr(data-label); font-weight: 600; color: #555; }
	.bkc-tabela td.bkc-col-check { position: absolute; left: 12px; top: 12px; width: auto; padding: 0; }
	.bkc-tabela td.bkc-col-check::before { content: none; }
	.bkc-tabela td[data-label="Negociar"] { justify-content: flex-end; padding-top: 8px; }
	.bkc-tabela td[data-label="Negociar"]::before { content: none; }
	.bkc-modal-acoes .bkc-btn { flex: 1 1 100%; }
}

.bkc-btn-negociar { background: var(--bkc-verde); border-color: var(--bkc-verde); border-radius: 100px; }
.bkc-btn-negociar:hover { background: var(--bkc-verde-esc); border-color: var(--bkc-verde-esc); }
.bkc-alerta { margin: 0 0 12px; padding: 10px 14px; border-radius: 6px; background: #fff4f4; color: var(--bkc-vermelho); font-weight: 600; }

.bkc-modal:not([open]) { display: none !important; }
.bkc-modal[open] { display: block; position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 100000; }
.bkc-modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.25); color: var(--bkc-texto); }
.bkc-modal::backdrop { background: rgba(0,0,0,.5); }
.bkc-modal-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--bkc-vermelho); color: #fff; }
.bkc-modal-topo h3 { margin: 0; font-size: 17px; line-height: 1.3; color: #fff; }
.bkc-modal-fechar { border: 0; background: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.bkc-resumo { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; padding: 16px 18px; }
.bkc-resumo dt { font-weight: 600; color: #555; }
.bkc-resumo dd { margin: 0; font-weight: 600; }
.bkc-resumo dd[data-r="tempo"], .bkc-resumo dd[data-r="cartas"] { font-weight: 400; }
.bkc-modal-acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 0 18px 18px; }
@media (max-width: 480px) { .bkc-resumo { grid-template-columns: 1fr; gap: 2px; } .bkc-resumo dd { margin-bottom: 8px; } }

/* 1.2.0: coluna Negociar sempre visível (fixa à direita quando a tabela rola na horizontal). */
@media (min-width: 761px) {
	.bkc-tabela th, .bkc-tabela td { padding: 8px 9px; }
	.bkc-tabela th:last-child,
	.bkc-tabela td:last-child { position: sticky; right: 0; z-index: 1; box-shadow: -8px 0 8px -8px rgba(0,0,0,.3); }
	.bkc-tabela th:last-child { background: var(--bkc-vermelho); }
	.bkc-tabela td:last-child { background: #fff; }
	.bkc-tabela tbody tr:nth-child(even) td:last-child { background: var(--bkc-zebra); }
	.bkc-tabela tbody tr.is-sel td:last-child { background: var(--bkc-sel); }
}
