:root {
  --bk-ink: #101418;
  --bk-muted: #5B6470;
  --bk-line: #E6E8EB;
  --bk-surface: #F6F7F8;
  --bk-accent: #0A7D4F;
  --bk-accent-dark: #086640;
  --bk-accent-soft: #E8F4EE;
  --bk-warn: #8A5A00;
  --bk-warn-soft: #FFF4D6;
  --bk-danger: #B42318;
  --bk-danger-soft: #FDECEA;
  --bk-gracia: #B54708;
  --bk-gracia-soft: #FEF0E6;
  --bk-nav-h: 68px;
  --bs-body-font-family: 'Manrope', system-ui, sans-serif;
  --bs-body-color: var(--bk-ink);
  --bs-border-color: var(--bk-line);
}

body { font-family: 'Manrope', system-ui, sans-serif; color: var(--bk-ink); background: #fff; }

/* Estructura */
.bk-app { min-height: 100vh; display: flex; flex-direction: column; }
.bk-main { flex: 1 0 auto; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px 16px 8px; }
.bk-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bk-header h1 { font-size: 22px; font-weight: 800; margin: 0; }

/* Navegación: abajo en celular, arriba en pantalla ancha */
.bk-nav { position: fixed; left: 0; right: 0; bottom: 0; height: var(--bk-nav-h); display: flex; background: #fff; border-top: 1px solid var(--bk-line); z-index: 1030; }
.bk-nav a, .bk-nav-salir button, .bk-nav-more { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--bk-muted); text-decoration: none; }
.bk-nav-salir { flex: 1; display: flex; margin: 0; }
.bk-nav-salir button { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.bk-nav a svg, .bk-nav-salir svg, .bk-nav-more svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-nav a.active, .bk-nav .bk-nav-more.active { color: var(--bk-accent); font-weight: 800; }
/* Nombre del usuario: arriba del contenido en celular, en la barra en pantalla ancha */
.bk-nav-user { display: none; }
.bk-user-line { text-align: right; font-size: 13px; font-weight: 600; color: var(--bk-muted); margin-bottom: 8px; }
/* Celular: la barra del dueño lleva 4 items (Vender, Stock, Productos, Más) */
@media (max-width: 767.98px) {
  .bk-nav a, .bk-nav-salir button, .bk-nav-more { min-width: 0; padding: 0 1px; font-size: 11px; letter-spacing: -.01em; white-space: nowrap; }
}
@media (min-width: 768px) {
  :root { --bk-nav-h: 0px; }
  .bk-nav { position: sticky; top: 0; bottom: auto; height: 64px; order: -1; padding: 0 16px; gap: 8px; justify-content: flex-start; border-top: 0; border-bottom: 1px solid var(--bk-line); }
  .bk-nav a, .bk-nav-salir button, .bk-nav-more { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 0 16px; font-size: 15px; }
  .bk-nav-user { display: flex; align-items: center; margin-left: auto; padding: 0 8px; font-size: 15px; font-weight: 600; color: var(--bk-ink); }
  .bk-user-line { display: none; }
  .bk-nav-salir { flex: 0 0 auto; }
}

/* Botones */
.btn-bk, .btn-bk-ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; border-radius: 14px; min-height: 48px; padding: 0 20px; font-weight: 700; }
.btn-bk { background: var(--bk-accent); color: #fff; border: 0; }
.btn-bk:hover, .btn-bk:focus { background: var(--bk-accent-dark); color: #fff; }
.btn-bk:disabled { background: #C9D1D6; color: #fff; cursor: not-allowed; }
.btn-bk-ghost { background: #fff; color: var(--bk-ink); border: 1px solid var(--bk-line); min-height: 44px; padding: 0 16px; font-weight: 600; }
.btn-bk-ghost:hover { background: var(--bk-surface); color: var(--bk-ink); }

/* Campos */
.form-control, .form-select { min-height: 48px; border-radius: 14px; border-color: var(--bk-line); background-color: var(--bk-surface); }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: var(--bk-accent); box-shadow: 0 0 0 3px var(--bk-accent-soft); }

/* Pestañas de categoría */
.bk-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--bk-line); overflow-x: auto; }
.bk-tab { background: none; border: 0; height: 44px; padding: 0; font-size: 15px; font-weight: 600; color: var(--bk-muted); white-space: nowrap; cursor: pointer; }
.bk-tab.active { color: var(--bk-accent); font-weight: 800; box-shadow: inset 0 -3px 0 var(--bk-accent); }

/* Opciones de talla y color, y cantidad */
.bk-chip { min-width: 48px; height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--bk-line); background: #fff; font-weight: 600; color: var(--bk-ink); cursor: pointer; }
.bk-chip.active { background: var(--bk-accent); border-color: var(--bk-accent); color: #fff; font-weight: 800; }
.bk-chip.agotada { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.bk-qty { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; font-weight: 700; color: var(--bk-ink); }

/* Producto en la cuadrícula */
.bk-tile { display: flex; flex-direction: column; gap: 8px; }
.bk-tile-img { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bk-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.bk-tile-initial { font-size: 44px; font-weight: 800; opacity: .55; }
.bk-add { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--bk-accent); display: flex; align-items: center; justify-content: center; }
.bk-tile-name { font-size: 14px; font-weight: 600; }
.bk-tile-price { font-size: 16px; font-weight: 800; }

/* Barra de cobro flotante */
.bk-cartbar { position: fixed; left: 16px; right: 16px; bottom: calc(var(--bk-nav-h) + 12px); z-index: 1020; display: none; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--bk-accent); color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(16, 20, 24, .18); }
.bk-cartbar.show-bar { display: flex; }
@media (min-width: 768px) { .bk-cartbar { left: auto; right: 24px; bottom: 24px; width: 360px; } }

/* Paneles laterales */
.offcanvas-bottom { border-radius: 20px 20px 0 0; }
.offcanvas-end { width: min(100vw, 420px); }

/* Tablas, avisos, etiquetas y mensajes */
.bk-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted); font-weight: 700; }
.bk-row-low td { background: var(--bk-warn-soft); }
.bk-alert-warn { background: var(--bk-warn-soft); color: var(--bk-warn); border-radius: 14px; padding: 12px 16px; font-weight: 600; }
.bk-alert-warn a { color: inherit; }
.bk-alert-ok { background: var(--bk-accent-soft); color: var(--bk-accent); border-radius: 14px; padding: 12px 16px; font-weight: 600; }
.bk-badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.bk-badge-in { background: var(--bk-accent-soft); color: var(--bk-accent); }
.bk-badge-out { background: var(--bk-surface); color: var(--bk-muted); }
.bk-toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: var(--bk-ink); color: #fff; font-size: 14px; font-weight: 600; }
.bk-toast-ok { background: var(--bk-accent); }

/* Menú Más: en celular las secciones extra van en el panel; en computadora se muestran todas */
@media (max-width: 767.98px) {
  .bk-nav .bk-nav-extra { display: none !important; }
  .bk-nav .bk-nav-more { display: flex !important; }
  /* Cada ítem toma su parte y el texto se corta con "…" en vez de montarse */
  .bk-nav a, .bk-nav-salir, .bk-nav-more { flex: 1 1 0; min-width: 0; }
  .bk-nav a span, .bk-nav-salir span, .bk-nav-more span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
@media (min-width: 768px) {
  .bk-nav .bk-nav-more, .bk-mas { display: none !important; }
}

/* El botón Más y el de Salir se ven igual que los enlaces, sin el estilo del navegador */
.bk-nav-more, .bk-nav-salir button {
  background: none; border: 0; outline: 0; box-shadow: none; padding: 0;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--bk-muted);
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.bk-nav a:focus-visible, .bk-nav-more:focus-visible, .bk-nav-salir button:focus-visible {
  outline: 2px solid var(--bk-accent); outline-offset: -4px; border-radius: 12px;
}
.bk-nav .bk-nav-more.active { color: var(--bk-accent); font-weight: 800; }
@media (min-width: 768px) {
  .bk-nav-salir button { font-size: 15px; padding: 0 16px; }
}

.bk-mas { height: auto; max-height: 70vh; border-radius: 20px 20px 0 0; }
.bk-mas .list-group-item { font-weight: 600; border-color: var(--bk-line); }

/* Pantalla mediana (tableta, laptop): la fila del dueño (10 secciones) necesita ~1420 px con íconos y nombre */
@media (min-width: 768px) and (max-width: 1499.98px) {
  .bk-nav { gap: 2px; padding: 0 8px; }
  .bk-nav a, .bk-nav-salir button { padding: 0 6px; font-size: 14px; }
  .bk-nav a svg, .bk-nav-salir svg { display: none; }
  .bk-nav-user { display: none; }
}

/* Pestañas que son enlaces (lista de clientes) */
a.bk-tab { display: inline-flex; align-items: center; text-decoration: none; }

/* Centro de reportes */
.bk-rep-card { display: flex; align-items: center; gap: 16px; padding: 18px; min-height: 88px; background: #fff; border: 1px solid var(--bk-line); border-radius: 16px; color: var(--bk-ink); text-decoration: none; height: 100%; }
.bk-rep-card:hover { background: var(--bk-surface); color: var(--bk-ink); }
.bk-rep-card svg { width: 44px; height: 44px; flex: none; padding: 10px; border-radius: 12px; background: var(--bk-accent-soft); stroke: var(--bk-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-rep-warn svg { background: var(--bk-warn-soft); stroke: var(--bk-warn); }
.bk-rep-titulo { display: block; font-weight: 800; font-size: 17px; }
.bk-rep-ayuda { display: block; color: var(--bk-muted); font-size: 14px; }
.bk-rep-dato { display: block; color: var(--bk-warn); font-weight: 800; font-size: 20px; }

/* ---------- Stock por producto ---------- */
:root { --bk-danger: #B42318; --bk-danger-soft: #FCE4E4; }
.min-w-0 { min-width: 0; }
.bk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.bk-stat { display: block; background: #fff; border: 1px solid var(--bk-line); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--bk-ink); }
.bk-stat .n { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.bk-stat .t { font-size: .75rem; color: var(--bk-muted); }
a.bk-stat:hover { color: var(--bk-ink); background: var(--bk-surface); }
.bk-stat-warn, a.bk-stat-warn:hover { background: var(--bk-warn-soft); border-color: transparent; }
.bk-stat-warn .n { color: var(--bk-warn); }

.bk-prod { background: #fff; border: 1px solid var(--bk-line); border-radius: 14px; padding: 0; margin-bottom: 12px; overflow: hidden; }
.bk-prod-alerta { border-left: 4px solid var(--bk-warn); }
.bk-prod-head { display: flex; gap: 12px; align-items: center; padding: 10px 12px; margin: 0; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.bk-prod-head::-webkit-details-marker { display: none; }
.bk-prod-head::marker { content: ""; }
.bk-prod-foto { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: #EEF1EF; flex-shrink: 0; display: block; }
.bk-prod-foto-vacia { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #9AA5A0; }
.bk-prod-nombre { font-weight: 700; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-chev { width: 20px; height: 20px; fill: none; stroke: var(--bk-muted); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex-shrink: 0; }
details[open] > .bk-prod-head .bk-chev { transform: rotate(180deg); }
.bk-prod-body { padding: 12px; border-top: 1px solid var(--bk-line); }
.bk-prod-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bk-prod-total { font-size: .85rem; color: var(--bk-muted); margin-bottom: 2px; }
.bk-prod-total a { color: var(--bk-accent-dark); font-weight: 700; text-decoration: none; }
.bk-badge-bajo, .bk-badge-agotado { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; margin-right: 4px; }
.bk-badge-bajo { background: var(--bk-warn-soft); color: var(--bk-warn); }
.bk-badge-agotado { background: var(--bk-danger-soft); color: var(--bk-danger); }

.bk-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.bk-var { border: 1px solid var(--bk-line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.bk-var-nombre { font-size: .8rem; color: var(--bk-muted); font-weight: 600; overflow-wrap: anywhere; }
.bk-var-n { font-size: 1.6rem; font-weight: 800; line-height: 1.15; }
.bk-var-nota { font-size: .7rem; font-weight: 700; }
.bk-var-ok { background: var(--bk-accent-soft); border-color: transparent; }
.bk-var-ok .bk-var-n { color: var(--bk-accent-dark); }
.bk-var-bajo { background: var(--bk-warn-soft); border-color: transparent; }
.bk-var-bajo .bk-var-n, .bk-var-bajo .bk-var-nota { color: var(--bk-warn); }
.bk-var-agotado { background: var(--bk-danger-soft); border-color: transparent; }
.bk-var-agotado .bk-var-n, .bk-var-agotado .bk-var-nota { color: var(--bk-danger); }

/* ---------- Movimientos como historial ---------- */
.bk-dia { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--bk-muted); margin: 20px 0 8px; display: flex; justify-content: space-between; }
.bk-dia span { font-weight: 600; text-transform: none; letter-spacing: 0; }
.bk-op { background: #fff; border: 1px solid var(--bk-line); border-radius: 14px; padding: 0; margin-bottom: 10px; overflow: hidden; }
.bk-op-head { display: flex; gap: 10px; align-items: center; padding: 12px; margin: 0; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.bk-op-head::-webkit-details-marker { display: none; }
.bk-op-head::marker { content: ""; }
details[open] > .bk-op-head .bk-chev { transform: rotate(180deg); }
.bk-op-fotos { display: flex; align-items: center; margin-top: 6px; }
.bk-op-fotos img, .bk-op-fotos .bk-op-sinfoto { width: 28px; height: 28px; border-radius: 7px; border: 2px solid #fff; margin-right: -6px; object-fit: cover; font-size: .8rem; }
.bk-op-mas { margin-left: 12px; font-size: .75rem; font-weight: 700; color: var(--bk-muted); }
details[open] > .bk-op-head .bk-op-fotos { display: none; }
.bk-op-monto { font-size: .8rem; font-weight: 700; color: var(--bk-ink); white-space: nowrap; }
.bk-op-body { padding: 4px 12px 12px; border-top: 1px solid var(--bk-line); }
.bk-op-body .bk-op-lineas { border-top: 0; margin-top: 6px; }
.bk-op-datos { margin: 8px 0 0; padding: 10px 12px; background: var(--bk-surface); border-radius: 10px; }
.bk-op-datos > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: .88rem; }
.bk-op-datos dt { font-weight: 600; color: var(--bk-muted); }
.bk-op-datos dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.bk-op-codigo { margin-top: 8px; font-size: .72rem; color: var(--bk-muted); }
.bk-op-icono { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #EEF1EF; color: var(--bk-ink); }
.bk-op-icono svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-op-venta .bk-op-icono { background: #E6F1FB; color: #185FA5; }
.bk-op-entrada .bk-op-icono { background: var(--bk-accent-soft); color: var(--bk-accent-dark); }
.bk-op-ajuste .bk-op-icono { background: var(--bk-warn-soft); color: var(--bk-warn); }
.bk-op-titulo { font-weight: 700; }
.bk-op-sub { font-size: .8rem; color: var(--bk-muted); }
.bk-op-total { font-size: 1.25rem; font-weight: 800; white-space: nowrap; }
.bk-op-total small { font-size: .7rem; font-weight: 600; color: var(--bk-muted); }
.bk-sube { color: var(--bk-accent-dark); }
.bk-baja { color: var(--bk-danger); }
.bk-op-lineas { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--bk-line); }
.bk-op-lineas li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.bk-op-lineas img, .bk-op-sinfoto { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #EEF1EF; display: flex; align-items: center; justify-content: center; }
.bk-op-link { display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 600; color: var(--bk-accent-dark); }
.bk-badge-fiado { background: var(--bk-warn-soft); color: var(--bk-warn); font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }

@media (min-width: 768px) {
  .bk-op, .bk-prod { max-width: 820px; }
}

/* ---------- Mi catálogo ---------- */
.bk-switch { width: 2.6em; height: 1.4em; cursor: pointer; }
.bk-switch:checked { background-color: var(--bk-accent); border-color: var(--bk-accent); }
.bk-switch:focus { box-shadow: 0 0 0 .2rem var(--bk-accent-soft); border-color: var(--bk-accent); }
.bk-switch:disabled { cursor: not-allowed; }

.cat-caja { border: 1px solid var(--bk-line); border-radius: 16px; padding: 16px; }
.cat-publicar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--bk-line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.cat-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--bk-line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; cursor: pointer; }
.cat-item[hidden] { display: none; }
.cat-item img, .cat-item-vacia { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #EEF1EF; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.cat-item[data-en="0"] img, .cat-item[data-en="0"] .cat-item-vacia { opacity: .5; }

/* ---------- Botón Descargar (PDF / Excel) ---------- */
.bk-ico-desc { width: 18px; height: 18px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bk-desc-menu { border-radius: 12px; border-color: var(--bk-line); max-width: calc(100vw - 32px); }
.bk-desc-menu .dropdown-item { min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.bk-desc-menu .dropdown-item:active { background: var(--bk-accent); }

/* ---------- Cuentas: login, contraseña, credencial, equipo y plataforma ---------- */
.bk-simple { max-width: 420px; margin: 0 auto; padding: 40px 16px 32px; }
.bk-simple-logo { text-align: center; font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }
.bk-simple-ico { width: 48px; height: 48px; fill: none; stroke: var(--bk-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk-credencial { border: 1px solid var(--bk-line); border-radius: 14px; padding: 16px; background: var(--bk-surface); overflow-wrap: anywhere; }
.bk-tarjeta { background: #fff; border: 1px solid var(--bk-line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.bk-tarjeta-off { background: var(--bk-surface); }
.bk-tarjeta-off .fw-bold { color: var(--bk-muted); }
.bk-badge-ok, .bk-badge-off { display: inline-block; flex-shrink: 0; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 3px 8px; }
.bk-badge-ok { background: var(--bk-accent-soft); color: var(--bk-accent-dark); }
.bk-badge-off { background: #EEF0F2; color: var(--bk-muted); }
.bk-form-angosto { max-width: 480px; }
.bk-user-line a { color: inherit; text-decoration: none; }
.bk-user-line a:hover { text-decoration: underline; }

/* Planes (Fase 19): semáforo Al día / Por vencer / Vencido / Sin plan */
.bk-plan-badge { display: inline-block; flex-shrink: 0; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.bk-plan-ok { background: var(--bk-accent-soft); color: var(--bk-accent-dark); }
.bk-plan-aviso { background: var(--bk-warn-soft); color: var(--bk-warn); }
.bk-plan-vencido { background: var(--bk-danger-soft); color: var(--bk-danger); }
.bk-plan-gracia { background: var(--bk-gracia-soft); color: var(--bk-gracia); }
.bk-plan-sin { background: #EEF0F2; color: var(--bk-muted); }
.bk-plan-txt-ok { color: var(--bk-accent-dark); }
.bk-plan-txt-aviso { color: var(--bk-warn); }
.bk-plan-txt-vencido { color: var(--bk-danger); }
.bk-plan-txt-gracia { color: var(--bk-gracia); }
.bk-plan-txt-sin { color: var(--bk-muted); }
.bk-resumen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.bk-resumen > div { background: #fff; border: 1px solid var(--bk-line); border-radius: 12px; padding: 8px 2px; text-align: center; min-width: 0; }
.bk-resumen .n { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.bk-resumen .t { font-size: .68rem; line-height: 1.2; color: var(--bk-muted); white-space: nowrap; }
.bk-tarjeta-link { display: block; color: inherit; text-decoration: none; }
.bk-tarjeta-link:hover { color: inherit; }
.bk-pago-anulado { background: var(--bk-surface); color: var(--bk-muted); }
.bk-pago-anulado .bk-pago-titulo { text-decoration: line-through; }
.bk-franja-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-radius: 14px; padding: 10px 12px 10px 16px; }
.bk-franja-plan .btn-bk-ghost { min-height: 40px; flex-shrink: 0; }
.bk-franja-aviso { background: var(--bk-warn-soft); color: var(--bk-warn); }
.bk-franja-gracia { background: var(--bk-gracia-soft); color: var(--bk-gracia); }
.bk-franja-vencido { background: var(--bk-danger-soft); color: var(--bk-danger); }

/* Cliente en el POS: botón opcional y hoja "Elegir cliente" */
.bk-cliente-barra { display: flex; gap: 8px; }
.bk-cliente-btn { flex: 1; min-width: 0; min-height: 52px; justify-content: flex-start; gap: 10px; text-align: left; }
.bk-cliente-btn svg, .bk-cliente-x svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bk-cliente-btn.bk-cliente-elegido { background: var(--bk-accent-soft); border-color: var(--bk-accent); color: var(--bk-accent-dark); font-weight: 800; }
.bk-cliente-x { width: 52px; min-height: 52px; padding: 0; flex: none; }
.bk-cliente-x[hidden] { display: none; }
.bk-cliente-debe { color: var(--bk-warn); font-weight: 700; }
.list-group-item.active .bk-cliente-debe, .list-group-item.active .text-muted { color: #fff !important; }
.bk-cliente-nuevo { border: 1px solid var(--bk-line); border-radius: 16px; padding: 16px; }
#cliente-lista .list-group-item.active { background: var(--bk-accent); border-color: var(--bk-accent); }
/* La hoja se abre encima del panel de cobro: ella y su fondo deben quedar sobre él y sobre la barra inferior (1030) */
.bk-sheet { --bs-offcanvas-height: 85vh; z-index: 1047; }
@supports (height: 1dvh) { .bk-sheet { --bs-offcanvas-height: 85dvh; } }
.offcanvas-backdrop ~ .offcanvas-backdrop { z-index: 1046; }
.bk-op-cliente { display: flex; align-items: center; gap: 4px; }
.bk-op-cliente svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Ventas (lista, detalle y anulación) */
.bk-dia-nav { display: flex; align-items: center; gap: 8px; }
.bk-dia-nav .btn-bk-ghost { width: 48px; min-height: 48px; padding: 0; flex: none; }
.bk-dia-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bk-apagado { opacity: .35; pointer-events: none; }
.bk-cifra { border: 1px solid var(--bk-line); border-radius: 14px; padding: 10px 14px; background: #fff; }
.bk-cifra .t { font-size: .8rem; color: var(--bk-muted); font-weight: 600; }
.bk-cifra .n { font-size: 1.6rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.bk-venta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; min-height: 64px; border: 1px solid var(--bk-line); border-radius: 14px; background: #fff; color: var(--bk-ink); text-decoration: none; }
.bk-venta:hover { background: var(--bk-surface); color: var(--bk-ink); }
.bk-venta-total { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.bk-venta-anulada { background: var(--bk-surface); color: var(--bk-muted); }
.bk-tachado { text-decoration: line-through; color: var(--bk-muted); }
.bk-badge-anulada { background: var(--bk-danger-soft); color: var(--bk-danger); font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; text-decoration: none; }
.bk-alert-anulada { background: var(--bk-danger-soft); color: var(--bk-danger); border-radius: 14px; padding: 12px 16px; font-weight: 600; overflow-wrap: anywhere; }
.bk-venta-resumen { border: 1px solid var(--bk-line); border-radius: 16px; padding: 14px 16px; }
.bk-venta-gran { font-size: 32px; font-weight: 800; line-height: 1.1; }
.bk-venta-lineas { border-top: 0; padding-top: 0; }
.bk-venta-lineas li { padding: 8px 0; border-bottom: 1px solid var(--bk-line); }
.btn-bk-peligro { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--bk-danger); background: #fff; color: var(--bk-danger); font-weight: 700; cursor: pointer; }
.btn-bk-peligro:hover, .btn-bk-peligro:focus { background: var(--bk-danger); color: #fff; }
.btn-bk-peligro:disabled { opacity: .6; cursor: wait; }
.bk-modal { border-radius: 20px; border: 0; }
.bk-op-anulacion .bk-op-icono { background: var(--bk-danger-soft); color: var(--bk-danger); }

/* Registrar entrada: cuadrícula de fotos como Vender + hoja de tallas */
.bk-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; background: #fff; border-top: 1px solid var(--bk-line); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 767.98px) { .bk-savebar { bottom: calc(var(--bk-nav-h) + env(safe-area-inset-bottom, 0px)); } }
.bk-entrada-wrap { padding-bottom: 0; }
.bk-plegable { border: 1px solid var(--bk-line); border-radius: 14px; background: #fff; }
.bk-plegable > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; font-weight: 700; }
.bk-plegable > summary::-webkit-details-marker { display: none; }
.bk-plegable > summary > svg:first-child { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--bk-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-plegable[open] > summary .bk-chev { transform: rotate(180deg); }
.bk-plegable-body { padding: 4px 14px 14px; }
.bk-tile-entrada { width: 100%; padding: 0; border: 0; background: none; text-align: left; color: var(--bk-ink); cursor: pointer; }
.bk-tile-entrada:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: 3px; border-radius: 16px; }
.bk-sin-foto { background: #EEF1EF; color: #5B6470; }
.bk-insignia { position: absolute; top: 8px; right: 8px; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px; background: var(--bk-accent); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(16, 20, 24, .2); }
.bk-insignia[hidden] { display: none; }
.bk-hoja-entrada { --bs-offcanvas-height: auto; max-height: 85vh; }
@supports (height: 1dvh) { .bk-hoja-entrada { max-height: 85dvh; } }
.bk-hoja-foto, .bk-hoja-foto-img { width: 64px; height: 64px; flex: none; }
.bk-hoja-foto-img { border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #EEF1EF; }
.bk-hoja-foto-img img { width: 100%; height: 100%; object-fit: cover; }
.bk-hoja-foto-img .bk-tile-initial { font-size: 28px; }
.bk-hoja-pie { padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--bk-line); background: #fff; }
.bk-fila-variante { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--bk-line); }
.bk-fila-variante:first-child { border-top: 0; }
.bk-paso { width: 48px; height: 48px; flex: none; border-radius: 12px; border: 1px solid var(--bk-line); background: #fff; color: var(--bk-ink); font-size: 1.5rem; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center; }
.bk-paso-mas { background: var(--bk-accent); border-color: var(--bk-accent); color: #fff; }
.bk-paso:disabled { opacity: .35; }
.bk-cant { width: 56px; height: 48px; flex: none; text-align: center; font-weight: 800; font-size: 1.15rem; border: 1px solid var(--bk-line); border-radius: 12px; background: var(--bk-surface); color: var(--bk-ink); }
.bk-cant:focus { outline: 0; border-color: var(--bk-accent); background: #fff; box-shadow: 0 0 0 3px var(--bk-accent-soft); }

/* Logo del negocio (acceso, catálogo público, Mi negocio) y pie de créditos */
.bk-logo { display: block; flex: none; object-fit: cover; background: #fff; }
.bk-logo-lg { width: 96px; height: 96px; border-radius: 24px; }
.bk-logo-md { width: 56px; height: 56px; border-radius: 16px; }
img.bk-logo { border: 1px solid var(--bk-line); }
.bk-logo-iniciales { display: flex; align-items: center; justify-content: center; background: var(--bk-accent); color: #fff; font-weight: 800; letter-spacing: .02em; }
.bk-logo-lg.bk-logo-iniciales { font-size: 32px; }
.bk-logo-md.bk-logo-iniciales { font-size: 20px; }
.bk-marca { text-align: center; margin: 8px 0 20px; }
.bk-marca .bk-logo { margin: 0 auto; }
.bk-marca h1 { font-size: 22px; font-weight: 800; margin: 14px 0 2px; overflow-wrap: anywhere; }
.bk-pie { flex: none; text-align: center; font-size: 12px; color: var(--bk-muted); padding: 16px; border-top: 1px solid var(--bk-line); margin-top: 32px; background: #fff; }
/* En la app el pie va al final del contenido (no fijo) y deja libre lo que tapan las barras fijas:
   la navegación inferior en el celular, el botón Cobrar del POS y la barra Total / Guardar entrada. */
.bk-app > .bk-pie { padding-bottom: calc(16px + var(--bk-nav-h) + env(safe-area-inset-bottom, 0px)); }
.bk-app:has(.bk-cartbar.show-bar) > .bk-pie { padding-bottom: calc(16px + var(--bk-nav-h) + 80px + env(safe-area-inset-bottom, 0px)); }
.bk-app:has(.bk-savebar) > .bk-pie { padding-bottom: calc(16px + var(--bk-nav-h) + 72px + env(safe-area-inset-bottom, 0px)); }
/* Pantallas simples (acceso, contraseña...): el pie abajo del todo aunque haya poco contenido */
.bk-simple { min-height: 100vh; display: flex; flex-direction: column; }
.bk-simple-espacio { flex: 1 0 0; }
.bk-subir-logo { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1.5px dashed var(--bk-line); border-radius: 14px; background: var(--bk-surface); font-weight: 700; cursor: pointer; }
.bk-subir-logo:hover { border-color: var(--bk-accent); }
.bk-subir-logo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-enlace-copiar { display: flex; gap: 8px; }
.bk-enlace-copiar .form-control { min-width: 0; font-size: 14px; }

/* Panel "Más": cada opción con su ícono */
.bk-mas-item { display: flex; align-items: center; gap: 12px; }
.bk-mas-item svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--bk-muted); }

/* Mi negocio por secciones */
.bk-seccion { border: 1px solid var(--bk-line); border-radius: 16px; padding: 20px 16px; background: #fff; }
.bk-seccion h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.bk-seccion .bk-ayuda { color: var(--bk-muted); font-size: 14px; margin-bottom: 16px; }
.bk-opcion { display: flex; align-items: center; min-height: 52px; padding: 0 16px; border: 1px solid var(--bk-line); border-radius: 12px; font-weight: 600; cursor: pointer; margin: 0; }
.btn-check:checked + .bk-opcion { border-color: var(--bk-accent); background: var(--bk-accent-soft); color: var(--bk-accent-dark); }
.btn-check:focus-visible + .bk-opcion { outline: 2px solid var(--bk-accent); outline-offset: 2px; }
.bk-opcion-barra { flex-direction: column; justify-content: center; gap: 4px; min-height: 76px; text-align: center; font-size: 14px; }
.bk-opcion-barra svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-interruptor { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--bk-line); margin: 0; }
.bk-interruptor .form-check-input { width: 3.2rem; height: 1.75rem; margin: 0; flex: none; float: none; cursor: pointer; }
.bk-interruptor .form-check-input:checked { background-color: var(--bk-accent); border-color: var(--bk-accent); }
