/* ==========================================================================
   BQ360 Demo v2 - Tema Bootstrap 5 con identidad BrandQuity
   ========================================================================== */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/archivo-latin-800-normal.woff2") format("woff2"); }

:root {
  --bq-red: #FF0000;
  --bq-red-ink: #D10000;
  --bq-red-deep: #9E0000;
  --bq-red-50: #FFF1F1;
  --bq-red-100: #FFE0E0;
  --bq-black: #000;
  --bq-canvas: #F4F5F7;
  --bq-line: #E3E5E9;
  --bq-line-2: #EEF0F3;
  --bq-text: #121417;
  --bq-text-2: #5A616C;
  --bq-text-3: #858B95;
  --bq-success: #0F7B3F;
  --bq-warning: #A15C00;
  --bq-info: #1E4FD8;
  --sidebar-w: 268px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 6px 18px -6px rgba(16, 24, 40, .12), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-3: 0 18px 40px -12px rgba(16, 24, 40, .22);

  /* Bootstrap */
  --bs-body-font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-body-color: var(--bq-text);
  --bs-body-bg: var(--bq-canvas);
  --bs-secondary-color: var(--bq-text-2);
  --bs-border-color: var(--bq-line);
  --bs-border-radius: .625rem;
  --bs-border-radius-sm: .5rem;
  --bs-border-radius-lg: .875rem;
  --bs-border-radius-xl: 1.125rem;
  --bs-primary: var(--bq-red-ink);
  --bs-primary-rgb: 209, 0, 0;
  --bs-primary-text-emphasis: var(--bq-red-deep);
  --bs-primary-bg-subtle: var(--bq-red-50);
  --bs-primary-border-subtle: var(--bq-red-100);
  --bs-link-color: var(--bq-red-ink);
  --bs-link-color-rgb: 209, 0, 0;
  --bs-link-hover-color: var(--bq-black);
  --bs-link-hover-color-rgb: 0, 0, 0;
  --bs-focus-ring-color: rgba(209, 0, 0, .25);
  --bs-danger: var(--bq-red-ink);
  --bs-danger-rgb: 209, 0, 0;
  --bs-dark-rgb: 0, 0, 0;
}
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .fw-black { font-weight: 800; letter-spacing: -.015em; }
.tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid rgba(209, 0, 0, .55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- Botones (variantes Bootstrap con color de marca) ------------------------ */
.btn { font-weight: 600; --bs-btn-border-radius: .5rem; }
.btn-primary { --bs-btn-bg: var(--bq-red-ink); --bs-btn-border-color: var(--bq-red-ink); --bs-btn-hover-bg: #B00000; --bs-btn-hover-border-color: #B00000; --bs-btn-active-bg: var(--bq-red-deep); --bs-btn-active-border-color: var(--bq-red-deep); --bs-btn-disabled-bg: var(--bq-red-ink); --bs-btn-disabled-border-color: var(--bq-red-ink); }
.btn-dark { --bs-btn-bg: #000; --bs-btn-border-color: #000; }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--bq-line); --bs-btn-hover-bg: #F7F8FA; --bs-btn-hover-border-color: #D5D8DD; --bs-btn-color: var(--bq-text); }
.btn-soft { background: var(--bq-red-50); color: var(--bq-red-ink); border: 1px solid var(--bq-red-100); }
.btn-soft:hover { background: var(--bq-red-100); color: var(--bq-red-deep); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; }

/* --- Avatares ----------------------------------------------------------------- */
.av { --av: #111; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--av); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .02em; flex: 0 0 auto; box-shadow: 0 0 0 2px #fff; }
.av-sm { width: 26px; height: 26px; font-size: .6rem; }
.av-lg { width: 44px; height: 44px; font-size: .85rem; }
.av-group { display: inline-flex; }
.av-group .av + .av { margin-left: -8px; }

/* --- Badges y estados ----------------------------------------------------------- */
.st { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .22rem .6rem; white-space: nowrap; line-height: 1.2; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st i { display: none; }
.st-ok { background: #E7F6EE; color: var(--bq-success); }
.st-info { background: #EAF0FF; color: var(--bq-info); }
.st-warn { background: #FFF2DE; color: var(--bq-warning); }
.st-crit { background: var(--bq-red-50); color: var(--bq-red-ink); }
.st-muted { background: #EEF0F3; color: var(--bq-text-2); }
.plan-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 700; padding: .16rem .5rem; border-radius: 999px; white-space: nowrap; background: rgba(255, 0, 0, .14); color: #FF8A8A; }
.plan-tag.is-all { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .72); }
.plan-tag-light { background: var(--bq-red-50); color: var(--bq-red-ink); }
.plan-tag-light.is-all { background: #EEF0F3; color: var(--bq-text-2); }

/* ==========================================================================
   Franja de demostración
   ========================================================================== */
.demo-bar { background: var(--bq-red-ink); color: #fff; font-size: .82rem; }
.demo-bar .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem 1.25rem; }
.demo-bar .tag { background: #fff; color: var(--bq-red-ink); font-weight: 800; border-radius: 4px; padding: .05rem .4rem; margin-right: .5rem; font-size: .7rem; }
.demo-bar a.cta { color: #fff; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: .2rem .8rem; white-space: nowrap; }
.demo-bar a.cta:hover { background: #fff; color: var(--bq-red-ink); }

/* ==========================================================================
   Barra lateral (oscura)
   ========================================================================== */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #000 !important; color: #fff; }
.sidebar .inner { display: flex; flex-direction: column; height: 100%; width: 100%; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; } .sidebar .inner { overflow-y: auto; } }
@media (max-width: 991.98px) { .sidebar { --bs-offcanvas-width: 288px; --bs-offcanvas-bg: #000; } }
.sb-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.35rem 1.35rem 1rem; }
.sb-brand img { height: 36px; width: auto; }
.sb-company { margin: 0 1rem 1rem; padding: .8rem .9rem; border-radius: .75rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .7rem; }
.sb-company .ic { width: 36px; height: 36px; border-radius: .6rem; background: var(--bq-red-ink); display: grid; place-items: center; flex: 0 0 auto; }
.sb-company strong { display: block; font-size: .86rem; line-height: 1.2; }
.sb-company small { color: rgba(255,255,255,.55); font-size: .74rem; }
.sb-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: rgba(255,255,255,.4); padding: 0 1.4rem; margin: .9rem 0 .4rem; }
.sb-nav { padding: 0 .75rem; }
.sb-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .65rem; border-radius: .6rem; color: rgba(255,255,255,.78); text-decoration: none; margin-bottom: 2px; transition: background .15s, color .15s; }
.sb-link .ic { width: 32px; height: 32px; border-radius: .5rem; display: grid; place-items: center; background: rgba(255,255,255,.07); font-size: .88rem; flex: 0 0 auto; }
.sb-link .tx { display: flex; flex-direction: column; gap: .15rem; min-width: 0; font-weight: 600; font-size: .9rem; line-height: 1.15; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link.active { background: #fff; color: #000; }
.sb-link.active .ic { background: var(--bq-red-ink); color: #fff; }
.sb-link.active .plan-tag { background: var(--bq-red-50); color: var(--bq-red-ink); }
.sb-link.active .plan-tag.is-all { background: #EEF0F3; color: var(--bq-text-2); }
.sb-cta { margin: auto 1rem 1rem; padding: 1.1rem; border-radius: .9rem; background: linear-gradient(160deg, #1A1A1A 0%, #0A0A0A 100%); border: 1px solid rgba(255,255,255,.08); }
.sb-cta h3 { font-size: .98rem; margin-bottom: .3rem; color: #fff; }
.sb-cta p { font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: .8rem; }
.sb-foot { padding: .9rem 1.4rem 1.2rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; display: flex; justify-content: space-between; }
.sb-foot a { color: rgba(255,255,255,.65); text-decoration: none; }
.sb-foot a:hover { color: #fff; }

/* ==========================================================================
   Navbar superior
   ========================================================================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--bq-line); padding: .6rem 1.5rem; display: flex; align-items: center; gap: .9rem; }
.topbar .search { position: relative; flex: 1; max-width: 420px; }
.topbar .search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--bq-text-3); }
.topbar .search .form-control { padding-left: 2.3rem; background: var(--bq-canvas); border-color: transparent; border-radius: .6rem; }
.topbar .search .form-control:focus { background: #fff; border-color: var(--bq-line); box-shadow: 0 0 0 3px rgba(209,0,0,.12); }
.topbar .search kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); background: #fff; color: var(--bq-text-3); border: 1px solid var(--bq-line); font-size: .7rem; padding: .05rem .35rem; }
.seg { display: inline-flex; background: var(--bq-canvas); border-radius: .65rem; padding: 3px; gap: 2px; }
.seg a { text-decoration: none; color: var(--bq-text-2); font-weight: 600; font-size: .84rem; padding: .38rem .8rem; border-radius: .5rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; }
.seg a:hover { color: var(--bq-text); background: rgba(255,255,255,.7); }
.seg a.on { background: #fff; color: var(--bq-text); box-shadow: var(--shadow-1), 0 0 0 1px var(--bq-line); }
.seg a.on i { color: var(--bq-red-ink); }
.tb-icon { position: relative; }
.tb-icon .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bq-red); box-shadow: 0 0 0 2px #fff; }
.dropdown-menu { --bs-dropdown-border-color: var(--bq-line); --bs-dropdown-box-shadow: var(--shadow-3); --bs-dropdown-link-active-bg: var(--bq-red-ink); --bs-dropdown-font-size: .88rem; border-radius: .75rem; padding: .4rem; box-shadow: var(--shadow-3); }
.dropdown-item { border-radius: .45rem; padding: .45rem .7rem; }
.dropdown-header { font-weight: 700; color: var(--bq-text); font-size: .85rem; }
.notif { width: 340px; }
.notif .dropdown-item { white-space: normal; display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; }
.notif .ni { width: 32px; height: 32px; border-radius: .5rem; display: grid; place-items: center; flex: 0 0 auto; background: var(--bq-red-50); color: var(--bq-red-ink); }
.notif small { color: var(--bq-text-3); }
.user-btn { display: flex; align-items: center; gap: .6rem; background: none; border: 0; padding: .25rem .4rem; border-radius: .6rem; }
.user-btn:hover { background: var(--bq-canvas); }
.user-btn .tx { text-align: left; line-height: 1.2; }
.user-btn .tx strong { display: block; font-size: .86rem; }
.user-btn .tx small { color: var(--bq-text-3); font-size: .74rem; }
@media (max-width: 1199.98px) { .user-btn .tx, .topbar .search { display: none !important; } }
@media (max-width: 767.98px) {
  .topbar { flex-wrap: wrap; padding: .55rem 1rem; gap: .5rem; }
  .seg { order: 5; width: 100%; }
  .seg a { flex: 1; justify-content: center; padding: .4rem .3rem; }
}
@media (max-width: 399.98px) { .seg a i { display: none; } }

/* ==========================================================================
   Contenido
   ========================================================================== */
.content { padding: 1.5rem 1.75rem 2.5rem; max-width: 1500px; width: 100%; }
@media (max-width: 575.98px) { .content { padding: 1rem 1rem 2rem; } }
.breadcrumb { --bs-breadcrumb-font-size: .8rem; --bs-breadcrumb-divider-color: var(--bq-text-3); --bs-breadcrumb-item-active-color: var(--bq-text-2); margin-bottom: .35rem; }
.breadcrumb a { color: var(--bq-text-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--bq-red-ink); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.page-title { font-size: clamp(1.45rem, 2.3vw, 1.85rem); margin: 0; display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.page-title .ic { width: 42px; height: 42px; border-radius: .7rem; background: #000; color: #fff; display: grid; place-items: center; font-size: 1.05rem; }
.page-sub { color: var(--bq-text-2); margin: .4rem 0 0; max-width: 72ch; }
.plan-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: #EEF0F3; color: var(--bq-text-2); }
.plan-chip.up { background: var(--bq-red-50); color: var(--bq-red-ink); }
.upsell { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .85rem 1.1rem; border-radius: .8rem; background: linear-gradient(90deg, #111 0%, #2A0000 100%); color: #fff; margin-bottom: 1.25rem; }
.upsell .ic { width: 38px; height: 38px; border-radius: .6rem; background: var(--bq-red-ink); display: grid; place-items: center; flex: 0 0 auto; }
.upsell p { margin: 0; flex: 1; min-width: 220px; font-size: .9rem; color: rgba(255,255,255,.85); }
.upsell strong { color: #fff; }

/* Tarjetas */
.card { --bs-card-border-color: var(--bq-line); --bs-card-border-radius: .875rem; --bs-card-cap-bg: #fff; --bs-card-spacer-x: 1.25rem; --bs-card-spacer-y: 1.1rem; box-shadow: var(--shadow-1); }
.card-header { border-bottom-color: var(--bq-line-2); padding-top: 1rem; padding-bottom: .9rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-title { font-size: 1rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.card-sub { font-size: .8rem; color: var(--bq-text-3); }
.card-link-sm { font-size: .82rem; font-weight: 600; text-decoration: none; }

/* KPI */
.kpi { position: relative; height: 100%; }
.kpi .card-body { display: flex; flex-direction: column; gap: .15rem; }
.kpi .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .55rem; }
.kpi .ic { width: 40px; height: 40px; border-radius: .65rem; display: grid; place-items: center; font-size: 1rem; background: var(--bq-red-50); color: var(--bq-red-ink); }
.kpi .ic.dark { background: #000; color: #fff; }
.kpi .label { font-size: .8rem; color: var(--bq-text-2); font-weight: 600; }
.kpi .value { font-size: clamp(1.4rem, 2vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .value.text { font-size: 1.15rem; line-height: 1.3; }
.kpi .foot { font-size: .78rem; color: var(--bq-text-3); margin-top: .2rem; }
.trend { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: .15rem .5rem; }
.trend.up { background: #E7F6EE; color: var(--bq-success); }
.trend.down { background: var(--bq-red-50); color: var(--bq-red-ink); }
.spark { height: 38px; margin-top: .45rem; }
@media (max-width: 575.98px) {
  .kpi .card-body { padding: .85rem .9rem; }
  .kpi .top { margin-bottom: .4rem; flex-wrap: wrap; gap: .3rem; }
  .kpi .ic { width: 32px; height: 32px; font-size: .85rem; }
  .kpi .label { font-size: .74rem; }
  .kpi .value { font-size: 1.15rem; }
  .kpi .value.text { font-size: .95rem; }
  .kpi .foot { font-size: .72rem; }
  .trend { font-size: .68rem; padding: .1rem .4rem; }
  .hello { padding: 1.25rem; }
  .hello .stats { gap: 1rem 1.5rem; }
  .page-head { margin-bottom: 1rem; }
}

/* Bienvenida */
.hello { position: relative; overflow: hidden; border-radius: 1rem; background: #000; color: #fff; padding: 1.5rem 1.6rem; margin-bottom: 1.25rem; }
.hello::after { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,0,0,.55) 0%, rgba(255,0,0,0) 70%); }
.hello h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0 0 .35rem; position: relative; z-index: 1; }
.hello p { color: rgba(255,255,255,.72); margin: 0; max-width: 62ch; position: relative; z-index: 1; }
.hello .stats { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 1.1rem; position: relative; z-index: 1; }
.hello .stats div { display: flex; flex-direction: column; }
.hello .stats strong { font-size: 1.35rem; font-weight: 800; }
.hello .stats span { font-size: .78rem; color: rgba(255,255,255,.6); }

/* Embudo */
.funnel { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.funnel li { display: grid; grid-template-columns: minmax(118px, 32%) 1fr auto; align-items: center; gap: .85rem; }
.funnel .nm { font-weight: 600; font-size: .87rem; }
.funnel .nm small { display: block; color: var(--bq-text-3); font-weight: 500; font-size: .72rem; }
.funnel .track { height: 28px; background: var(--bq-canvas); border-radius: .45rem; overflow: hidden; }
.funnel .fill { height: 100%; border-radius: .45rem; display: flex; align-items: center; justify-content: flex-end; padding-right: .5rem; color: #fff; font-size: .74rem; font-weight: 700; min-width: 28px; }
.funnel .num { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.funnel li.worst .nm { color: var(--bq-red-ink); }
.funnel li.worst .track { box-shadow: inset 0 0 0 2px var(--bq-red-ink); }

/* Listas */
.list-group { --bs-list-group-border-color: var(--bq-line-2); }
.lg-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.25rem; }
.lg-row .meta { flex: 1; min-width: 0; }
.lg-row .meta strong { display: block; font-size: .88rem; font-weight: 600; }
.lg-row .meta small { color: var(--bq-text-3); font-size: .78rem; }
.when { font-size: .72rem; font-weight: 700; border-radius: .4rem; padding: .2rem .5rem; background: #EEF0F3; color: var(--bq-text-2); white-space: nowrap; }
.when.late { background: var(--bq-red-50); color: var(--bq-red-ink); }
.when.today { background: #000; color: #fff; }
.feed { list-style: none; margin: 0; padding: 0 1.25rem; }
.feed li { position: relative; display: flex; gap: .8rem; padding: .7rem 0; }
.feed li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 42px; bottom: -4px; width: 2px; background: var(--bq-line-2); }
.feed .fi { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--bq-canvas); color: var(--bq-text); font-size: .8rem; position: relative; z-index: 1; }
.feed .fi.red { background: var(--bq-red-50); color: var(--bq-red-ink); }
.feed .tx { font-size: .86rem; }
.feed .tx small { display: block; color: var(--bq-text-3); font-size: .74rem; }

/* Módulos (inicio) */
.mod-tile { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--bq-line); border-radius: .8rem; text-decoration: none; color: var(--bq-text); background: #fff; height: 100%; transition: border-color .15s, box-shadow .15s, transform .15s; }
.mod-tile:hover { border-color: #000; box-shadow: var(--shadow-2); transform: translateY(-1px); color: var(--bq-text); }
.mod-tile .ic { width: 42px; height: 42px; border-radius: .65rem; display: grid; place-items: center; background: #000; color: #fff; flex: 0 0 auto; }
.mod-tile strong { display: block; margin-bottom: .15rem; }
.mod-tile p { font-size: .82rem; color: var(--bq-text-2); margin: 0 0 .45rem; }

/* Pestañas (nav-pills) */
.nav-pills { --bs-nav-pills-link-active-bg: #000; --bs-nav-pills-border-radius: .55rem; --bs-nav-link-color: var(--bq-text-2); --bs-nav-link-hover-color: var(--bq-text); --bs-nav-link-font-weight: 600; --bs-nav-link-padding-y: .45rem; --bs-nav-link-padding-x: .85rem; gap: .25rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-pills .nav-link { white-space: nowrap; font-size: .88rem; display: inline-flex; align-items: center; gap: .45rem; }
.nav-pills .nav-link .badge { background: rgba(0,0,0,.08); color: inherit; font-weight: 700; }
.nav-pills .nav-link.active .badge { background: rgba(255,255,255,.2); }

/* Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(258px, 1fr); gap: .9rem; overflow-x: auto; padding: .15rem .15rem .75rem; scrollbar-width: thin; }
.board-col { background: #EBEDF0; border-radius: .85rem; padding: .7rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.board-head { padding: .25rem .3rem .45rem; }
.board-head .ttl { display: flex; align-items: center; gap: .5rem; }
.board-head .bar { width: 4px; height: 18px; border-radius: 4px; background: var(--stage, #000); }
.board-head h3 { font-size: .9rem; margin: 0; font-weight: 700; flex: 1; }
.board-head .badge { background: #fff; color: var(--bq-text); font-weight: 700; border: 1px solid var(--bq-line); }
.board-head .sum { font-size: .78rem; color: var(--bq-text-2); margin: .2rem 0 0 .75rem; font-variant-numeric: tabular-nums; }
.deal { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--bq-line); border-radius: .7rem; padding: .8rem .85rem; box-shadow: var(--shadow-1); font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s, transform .12s; }
button.deal:hover { border-color: #C9CDD3; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.deal.late { box-shadow: inset 3px 0 0 var(--bq-red-ink), var(--shadow-1); }
.deal .row1 { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; margin-bottom: .25rem; }
.deal .acc { font-weight: 700; font-size: .88rem; line-height: 1.3; }
.deal .id { font-size: .7rem; color: var(--bq-text-3); font-weight: 600; white-space: nowrap; }
.deal .val { font-weight: 800; font-size: 1rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-bottom: .35rem; }
.deal .nxt { font-size: .78rem; color: var(--bq-text-2); display: flex; gap: .4rem; margin-bottom: .55rem; line-height: 1.35; }
.deal .nxt i { color: var(--bq-text-3); margin-top: .15rem; }
.deal .ft { display: flex; align-items: center; gap: .55rem; }
.deal .progress { flex: 1; height: 6px; --bs-progress-bg: #EEF0F3; --bs-progress-bar-bg: #000; }
.deal .pct { font-size: .72rem; font-weight: 700; color: var(--bq-text-2); font-variant-numeric: tabular-nums; }
.deal .chip { font-size: .68rem; font-weight: 700; background: #EEF0F3; color: var(--bq-text-2); border-radius: .35rem; padding: .1rem .45rem; display: inline-block; margin-bottom: .4rem; }
.board-empty { text-align: center; color: var(--bq-text-3); font-size: .8rem; padding: 1rem 0; border: 1px dashed #CDD1D6; border-radius: .7rem; }
.prio { font-size: .68rem; font-weight: 700; border-radius: .35rem; padding: .1rem .45rem; }
.prio-alta { background: var(--bq-red-50); color: var(--bq-red-ink); }
.prio-media { background: #FFF2DE; color: var(--bq-warning); }
.prio-baja { background: #EEF0F3; color: var(--bq-text-2); }

/* Tablas */
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--bq-line-2); --bs-table-hover-bg: #F8F9FB; margin: 0; font-size: .875rem; }
.table > thead > tr > th { font-size: .74rem; font-weight: 700; color: var(--bq-text-3); letter-spacing: .02em; background: #FAFBFC; border-bottom: 1px solid var(--bq-line); padding: .7rem 1rem; white-space: nowrap; }
.table > tbody > tr > td { padding: .75rem 1rem; vertical-align: middle; }
.table > tbody > tr:last-child > td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: .65rem; }
.who .n { display: flex; flex-direction: column; line-height: 1.25; }
.who .n strong { font-weight: 600; }
.who .n small { color: var(--bq-text-3); font-size: .76rem; }
.tbl-tools { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.tbl-tools .search-sm { position: relative; }
.tbl-tools .search-sm i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--bq-text-3); font-size: .82rem; }
.tbl-tools .search-sm .form-control { padding-left: 2rem; width: 260px; max-width: 100%; }
.card-footer { background: #fff; border-top-color: var(--bq-line-2); display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .8rem; color: var(--bq-text-3); }
.pagination { --bs-pagination-font-size: .8rem; --bs-pagination-padding-x: .6rem; --bs-pagination-padding-y: .25rem; --bs-pagination-color: var(--bq-text); --bs-pagination-active-bg: #000; --bs-pagination-active-border-color: #000; --bs-pagination-border-color: var(--bq-line); --bs-pagination-hover-color: var(--bq-text); margin: 0; }
tr.is-hidden { display: none; }
.stock { min-width: 120px; }
.stock .progress { height: 6px; --bs-progress-bg: #EEF0F3; }
.stock small { font-size: .72rem; color: var(--bq-text-3); }
.form-check-input:checked { background-color: var(--bq-red-ink); border-color: var(--bq-red-ink); }
.form-switch .form-check-input:disabled { opacity: 1; }
.form-check-input:disabled ~ .form-check-label { opacity: 1; }

/* Stepper de proceso */
.stepper { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: .5rem; counter-reset: s; }
.stepper li { counter-increment: s; position: relative; padding-top: 2.6rem; font-size: .8rem; color: var(--bq-text-2); }
.stepper li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .82rem; z-index: 1; }
.stepper li:last-child::before { background: var(--bq-red-ink); }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 36px; right: -4px; height: 2px; background: var(--bq-line); }
.stepper strong { display: block; color: var(--bq-text); font-size: .86rem; margin-bottom: .2rem; line-height: 1.3; }
.stepper span { display: block; }
@media (max-width: 991.98px) {
  .stepper { grid-template-columns: 1fr; gap: 0; }
  .stepper li { padding: 0 0 1rem 2.8rem; }
  .stepper li:not(:last-child)::after { top: 34px; left: 15px; right: auto; bottom: 0; width: 2px; height: auto; }
}

/* Presupuesto */
.budget { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.05rem; }
.budget .top { display: flex; justify-content: space-between; gap: .5rem; font-size: .86rem; margin-bottom: .35rem; flex-wrap: wrap; }
.budget .top span { color: var(--bq-text-2); font-variant-numeric: tabular-nums; }
.budget .progress { height: 8px; --bs-progress-bg: #EEF0F3; --bs-progress-bar-bg: #000; border-radius: 999px; }
.budget .over .progress { --bs-progress-bar-bg: var(--bq-red-ink); }
.budget .bot { font-size: .76rem; color: var(--bq-text-3); margin-top: .3rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Automatización */
.flow { list-style: none; padding: 0; margin: 0; }
.flow li { position: relative; display: flex; gap: .85rem; padding-bottom: 1rem; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 42px; bottom: 2px; width: 2px; background: repeating-linear-gradient(to bottom, var(--bq-line) 0 4px, transparent 4px 8px); }
.flow .fi { width: 40px; height: 40px; border-radius: .7rem; display: grid; place-items: center; flex: 0 0 auto; background: var(--bq-canvas); color: var(--bq-text); border: 1px solid var(--bq-line); }
.flow .trigger .fi { background: var(--bq-red-ink); color: #fff; border-color: var(--bq-red-ink); }
.flow .condition .fi { background: #000; color: #fff; border-color: #000; }
.flow .box { flex: 1; border: 1px solid var(--bq-line); border-radius: .7rem; padding: .55rem .8rem; background: #fff; font-size: .87rem; }
.flow .box small { display: block; font-size: .7rem; font-weight: 700; color: var(--bq-text-3); letter-spacing: .03em; }

/* Gráficos */
.chart-box { position: relative; height: 270px; }
.chart-box.chart-hbar { height: 230px; }
.chart-data { margin-top: .6rem; font-size: .8rem; }
.chart-data summary { cursor: pointer; color: var(--bq-text-3); font-weight: 600; width: max-content; }
.chart-data table { margin-top: .5rem; max-width: 420px; }

/* Sugerencias e IA */
.insight { height: 100%; border: 1px solid var(--bq-line); border-radius: .8rem; padding: 1rem; display: flex; flex-direction: column; gap: .45rem; background: #fff; }
.insight .ic { width: 38px; height: 38px; border-radius: .6rem; display: grid; place-items: center; background: var(--bq-red-50); color: var(--bq-red-ink); }
.insight h3 { font-size: .95rem; margin: 0; font-weight: 700; }
.insight p { font-size: .84rem; color: var(--bq-text-2); margin: 0; flex: 1; }
.ai { background: #0A0A0A; color: #fff; border: 0; }
.ai .card-header { background: transparent; border-bottom-color: rgba(255,255,255,.08); }
.ai .card-title { color: #fff; }
.ai .msg { display: flex; gap: .7rem; margin-bottom: .9rem; }
.ai .msg .bubble { border-radius: .8rem; padding: .7rem .9rem; font-size: .87rem; line-height: 1.5; max-width: 90%; }
.ai .msg.q { justify-content: flex-end; }
.ai .msg.q .bubble { background: #fff; color: #000; border-bottom-right-radius: .25rem; }
.ai .msg.a .bubble { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-bottom-left-radius: .25rem; }
.ai .bot { width: 30px; height: 30px; border-radius: 50%; background: var(--bq-red-ink); display: grid; place-items: center; flex: 0 0 auto; font-size: .8rem; }
.ai .input-group .form-control { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
.ai .input-group .form-control::placeholder { color: rgba(255,255,255,.45); }
.ai .note { font-size: .72rem; color: rgba(255,255,255,.45); margin-top: .6rem; }

/* Integraciones */
.integ { height: 100%; border: 1px solid var(--bq-line); border-radius: .85rem; padding: 1rem; background: #fff; display: flex; flex-direction: column; gap: .6rem; }
.integ .hd { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.integ .logo { width: 44px; height: 44px; border-radius: .7rem; display: grid; place-items: center; font-size: 1.25rem; color: #fff; background: var(--brand, #000); }
.integ h3 { font-size: .95rem; margin: 0; font-weight: 700; }
.integ p { font-size: .82rem; color: var(--bq-text-2); margin: 0; flex: 1; }
pre.code { background: #0A0A0A; color: #E8E8E8; border-radius: .7rem; padding: .9rem 1rem; font-size: .78rem; line-height: 1.6; margin: 0; white-space: pre-wrap; word-break: break-word; }
pre.code .k { color: #FF7A7A; font-weight: 700; }
pre.code .c { color: #8A8F98; }
pre.code-json { max-height: 270px; overflow: auto; }

/* CTA final */
.next { margin-top: 1.5rem; border-radius: 1rem; background: #fff; border: 1px solid var(--bq-line); box-shadow: var(--shadow-1); padding: 1.4rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.next::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--bq-red); }
.next h2 { font-size: 1.2rem; margin: 0 0 .2rem; }
.next p { margin: 0; color: var(--bq-text-2); max-width: 64ch; font-size: .9rem; }

/* Modal y toast */
.modal-content { border: 0; border-radius: 1rem; box-shadow: var(--shadow-3); }
.modal-header { border-bottom-color: var(--bq-line-2); align-items: flex-start; padding: 1.2rem 1.4rem; }
.modal-body { padding: 1.2rem 1.4rem; }
.modal-footer { border-top-color: var(--bq-line-2); }
.modal-title { font-size: 1.25rem; }
.op-id { font-size: .76rem; color: var(--bq-text-3); font-weight: 700; }
.op-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin: 0 0 1.1rem; }
.op-grid dt { font-size: .74rem; color: var(--bq-text-3); font-weight: 600; }
.op-grid dd { margin: 0; font-weight: 700; }
.op-next { background: var(--bq-red-50); border-radius: .65rem; padding: .7rem .9rem; margin-bottom: 1.2rem; font-size: .88rem; color: var(--bq-red-deep); }
.op-tl-title { font-weight: 700; margin-bottom: .6rem; }
.op-tl { list-style: none; padding: 0; margin: 0; }
.op-tl li { position: relative; padding: 0 0 .85rem 1.5rem; font-size: .87rem; }
.op-tl li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 11px; height: 11px; border-radius: 50%; background: #000; box-shadow: 0 0 0 3px #fff; z-index: 1; }
.op-tl li:first-child::before { background: var(--bq-red-ink); }
.op-tl li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: .9rem; bottom: 0; width: 2px; background: var(--bq-line); }
.op-tl time { display: block; font-size: .72rem; color: var(--bq-text-3); font-weight: 700; }
.toast { border: 0; background: #000; color: #fff; border-radius: .75rem; box-shadow: var(--shadow-3); }
.toast i.fa-lock { color: var(--bq-red); }
.tooltip { --bs-tooltip-bg: #000; --bs-tooltip-font-size: .78rem; }
.text-2 { color: var(--bq-text-2) !important; }
.text-3 { color: var(--bq-text-3) !important; }

/* ==========================================================================
   Página de entrada
   ========================================================================== */
.entry { background: #fff; }
.entry-hero { background: #000; color: #fff; position: relative; overflow: hidden; padding: 1.25rem 0 0; }
.entry-hero::before { content: ""; position: absolute; right: -10%; top: -30%; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, rgba(255,0,0,.45) 0%, rgba(255,0,0,0) 65%); }
.entry-hero .container { position: relative; z-index: 1; }
.entry-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.entry-nav img { height: 40px; width: auto; }
.entry-nav a.back { color: rgba(255,255,255,.75); text-decoration: none; font-weight: 600; font-size: .9rem; }
.entry-nav a.back:hover { color: #fff; }
.entry-hero h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); line-height: 1.02; letter-spacing: -.03em; max-width: 15ch; margin-bottom: 1.1rem; }
.entry-hero .lead { color: rgba(255,255,255,.72); max-width: 54ch; font-size: 1.1rem; margin-bottom: 2rem; }
.entry-hero .pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.entry-hero .pills span { border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85); border-radius: 999px; padding: .3rem .8rem; font-size: .82rem; font-weight: 600; }
.entry-hero .pills i { color: var(--bq-red); margin-right: .35rem; }
.preview { background: #fff; border-radius: 1rem 1rem 0 0; box-shadow: 0 -10px 60px rgba(255,0,0,.2); overflow: hidden; color: var(--bq-text); }
.preview .chrome { display: flex; gap: .4rem; padding: .7rem .9rem; background: #F1F2F4; border-bottom: 1px solid var(--bq-line); align-items: center; }
.preview .chrome span { width: 11px; height: 11px; border-radius: 50%; background: #D3D6DB; }
.preview .chrome em { margin-left: .8rem; font-style: normal; font-size: .75rem; color: var(--bq-text-3); background: #fff; border-radius: .4rem; padding: .15rem .7rem; }
.preview .body { display: grid; grid-template-columns: 160px 1fr; min-height: 250px; }
.preview .side { background: #000; padding: .9rem .7rem; display: flex; flex-direction: column; gap: .35rem; }
.preview .side i { color: rgba(255,255,255,.7); font-size: .8rem; width: 26px; height: 26px; border-radius: .4rem; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.preview .side div { display: flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.75); font-size: .74rem; font-weight: 600; }
.preview .side div.on { color: #000; background: #fff; border-radius: .5rem; padding: .2rem; }
.preview .side div.on i { background: var(--bq-red-ink); color: #fff; }
.preview .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; padding: .9rem; background: var(--bq-canvas); }
.preview .col { background: #EBEDF0; border-radius: .6rem; padding: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.preview .col b { font-size: .7rem; display: flex; align-items: center; gap: .3rem; }
.preview .col b::before { content: ""; width: 3px; height: 12px; border-radius: 3px; background: var(--c); }
.preview .mini { background: #fff; border-radius: .45rem; padding: .45rem; box-shadow: var(--shadow-1); }
.preview .mini i { display: block; height: 6px; border-radius: 3px; background: #E3E5E9; margin-bottom: .3rem; }
.preview .mini i:first-child { width: 80%; background: #C9CDD3; }
.preview .mini i:nth-child(2) { width: 45%; background: #000; }
.preview .mini i:last-child { width: 60%; margin: 0; }
@media (max-width: 767.98px) { .preview .body { grid-template-columns: 1fr; } .preview .side { display: none; } .preview .cols { grid-template-columns: repeat(2, 1fr); } }
.sectors { padding: 4rem 0 1rem; }
.sectors h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .5rem; }
.sector { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--bq-text); border: 1px solid var(--bq-line); border-radius: 1.1rem; padding: 1.5rem; background: #fff; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .2s, transform .2s; }
.sector:hover, .sector:focus-visible { border-color: #000; box-shadow: var(--shadow-3); transform: translateY(-3px); color: var(--bq-text); }
.sector .hd { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.sector .ic { width: 48px; height: 48px; border-radius: .8rem; background: #000; color: #fff; display: grid; place-items: center; font-size: 1.15rem; transition: background .15s; }
.sector:hover .ic { background: var(--bq-red-ink); }
.sector .hd strong { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.sector .co { font-weight: 700; }
.sector .giro { color: var(--bq-text-2); font-size: .88rem; min-height: 2.8em; margin-bottom: 1.2rem; }
.sector .lbl { font-size: .74rem; font-weight: 700; color: var(--bq-text-3); margin-bottom: .5rem; letter-spacing: .03em; }
.sector .fun { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 4px; }
.sector .fun li { width: var(--w); margin: 0 auto; background: var(--c); color: #fff; border-radius: .4rem; text-align: center; font-size: .73rem; font-weight: 700; padding: .34rem .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sector .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--bq-red-ink); border-top: 1px solid var(--bq-line-2); padding-top: 1rem; }
.sector .go i { transition: transform .15s; }
.sector:hover .go i { transform: translateX(4px); }
.mods { padding: 3rem 0 4rem; }
.mods .item { display: flex; gap: .85rem; align-items: flex-start; height: 100%; padding: 1.1rem; border-radius: .9rem; background: var(--bq-canvas); }
.mods .item .ic { width: 42px; height: 42px; border-radius: .7rem; background: #fff; color: var(--bq-red-ink); display: grid; place-items: center; box-shadow: var(--shadow-1); flex: 0 0 auto; }
.mods .item strong { display: block; }
.mods .item p { font-size: .84rem; color: var(--bq-text-2); margin: .15rem 0 .5rem; }
.entry-foot { border-top: 1px solid var(--bq-line); padding: 1.25rem 0; font-size: .84rem; color: var(--bq-text-2); }
.bq-wordmark { font-family: "Arial Black", Archivo, sans-serif; font-weight: 900; color: #000; text-decoration: none; }
.bq-wordmark .r { color: var(--bq-red); }
