/* CBK · Modo Visualizador operacional */
.cbk-vz-trigger {
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, hsl(var(--primary, 220 90% 56%)), rgba(59, 130, 246, 0.88));
  color: hsl(var(--primary-foreground, 0 0% 100%));
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 0.9rem;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.cbk-vz-trigger:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.cbk-vz-trigger__icon {
  font-size: 0.95rem;
}

.cbk-vz-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.20), transparent 34rem),
    linear-gradient(135deg, #07111f 0%, #0b1220 48%, #050816 100%);
  color: #eef6ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.cbk-vz-shell {
  width: 100%;
  height: 100%;
  padding: clamp(14px, 1.55vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.2vw, 18px);
}

.cbk-vz-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 0.75rem 1rem;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.cbk-vz-titlebox {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.cbk-vz-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(45, 212, 191, 0.82));
  box-shadow: 0 0 38px rgba(45, 212, 191, 0.22);
  font-weight: 950;
  color: #03111d;
}

.cbk-vz-kicker {
  color: #7dd3fc;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 900;
}

.cbk-vz-title {
  margin: 0;
  font-size: clamp(1.1rem, 1.55vw, 1.55rem);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbk-vz-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: #cbd5e1;
  font-size: 0.82rem;
  text-align: right;
}

.cbk-vz-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-weight: 800;
}

.cbk-vz-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cbk-vz-action {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.88);
  color: #e0f2fe;
  min-width: 38px;
  height: 38px;
  border-radius: 13px;
  padding: 0 0.72rem;
  font-weight: 950;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.cbk-vz-action:hover {
  background: rgba(51, 65, 85, 0.96);
  border-color: rgba(125, 211, 252, 0.48);
  transform: translateY(-1px);
}

.cbk-vz-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(10px, 1vw, 16px);
}

.cbk-vz-card {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.76)),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
  padding: clamp(13px, 1.05vw, 18px);
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.cbk-vz-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.72;
}

.cbk-vz-card--wide {
  grid-column: span 2;
}

.cbk-vz-card--tall {
  grid-row: span 2;
}

.cbk-vz-card__head,
.cbk-vz-card__body,
.cbk-vz-card__foot {
  position: relative;
  z-index: 1;
}

.cbk-vz-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.cbk-vz-card__title {
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(0.78rem, 0.88vw, 0.98rem);
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cbk-vz-card__tag {
  color: #93c5fd;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.cbk-vz-value {
  font-size: clamp(1.55rem, 2.8vw, 3.3rem);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: -0.065em;
  color: #f8fafc;
}

.cbk-vz-subvalue {
  color: #bae6fd;
  font-size: clamp(0.78rem, 0.9vw, 0.95rem);
  font-weight: 800;
}

.cbk-vz-card__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.72rem;
}

.cbk-vz-card__foot {
  color: #94a3b8;
  font-size: clamp(0.72rem, 0.78vw, 0.84rem);
  font-weight: 650;
  line-height: 1.25;
}

.cbk-vz-bars {
  display: grid;
  gap: 0.42rem;
}

.cbk-vz-bar-row {
  display: grid;
  grid-template-columns: minmax(74px, 0.84fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.cbk-vz-bar-label {
  min-width: 0;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cbk-vz-bar-track {
  height: 0.62rem;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.48);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.cbk-vz-bar-fill {
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #38bdf8 48%, #818cf8);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.32);
}

.cbk-vz-bar-num {
  color: #e0f2fe;
  font-size: 0.75rem;
  font-weight: 950;
  min-width: 2ch;
  text-align: right;
}

.cbk-vz-donut-wrap {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1vw, 1.1rem);
}

.cbk-vz-donut {
  flex: 0 0 auto;
  width: clamp(82px, 7vw, 122px);
  height: clamp(82px, 7vw, 122px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#22d3ee calc(var(--p, 0) * 1%), rgba(71, 85, 105, 0.52) 0);
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.16);
}

.cbk-vz-donut::after {
  content: attr(data-label);
  width: 68%;
  height: 68%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: #f8fafc;
  font-weight: 1000;
  font-size: clamp(0.9rem, 1.25vw, 1.28rem);
  letter-spacing: -0.05em;
}

.cbk-vz-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.38rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 720;
}

.cbk-vz-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding-bottom: 0.25rem;
}

.cbk-vz-list strong {
  color: #e0f2fe;
  font-weight: 950;
}

.cbk-vz-spark {
  width: 100%;
  height: clamp(62px, 7vw, 100px);
  display: block;
}

.cbk-vz-spark-grid {
  stroke: rgba(148, 163, 184, 0.16);
  stroke-width: 1;
}

.cbk-vz-spark-line {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}

.cbk-vz-spark-area {
  fill: rgba(56, 189, 248, 0.16);
}

.cbk-vz-empty {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.48);
  color: #94a3b8;
  border-radius: 18px;
  padding: 0.85rem;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
}

.cbk-vz-loading,
.cbk-vz-error {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
  padding: 2rem;
}

.cbk-vz-loading strong,
.cbk-vz-error strong {
  display: block;
  color: #f8fafc;
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.cbk-vz-error span {
  color: #fecaca;
}

.cbk-vz-warning {
  grid-column: 1 / -1;
  border-radius: 18px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  background: rgba(113, 63, 18, 0.28);
  color: #fde68a;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.cbk-vz-body-locked {
  overflow: hidden !important;
}

@media (max-width: 1400px) {
  .cbk-vz-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .cbk-vz-overlay {
    overflow: auto;
  }
  .cbk-vz-shell {
    min-height: 100%;
  }
  .cbk-vz-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .cbk-vz-meta {
    justify-content: flex-start;
    text-align: left;
  }
  .cbk-vz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  .cbk-vz-card,
  .cbk-vz-card--wide,
  .cbk-vz-card--tall {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 230px;
  }
}

@media (max-width: 620px) {
  .cbk-vz-grid {
    grid-template-columns: 1fr;
  }
  .cbk-vz-card {
    min-height: 220px;
  }
  .cbk-vz-trigger {
    width: 100%;
    justify-content: center;
  }
}
