/* bkg.css — Booking Analytics tab */

/* Page wrappers (mirrors overview-v2 / mkt) */
.rev-page { padding: 24px 32px 80px; }
.rev-page-head { margin-bottom: 18px; }
.rev-page-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 4px;
}
.rev-page-title {
  font-family: var(--font-display, 'Gabarito', sans-serif);
  font-size: 28px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em; margin: 0;
}
.rev-page-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.rev-page-actions { display: flex; gap: 8px; align-items: center; }

.rev-section-header { margin: 22px 0 14px; }
.rev-section-title { font-size: 16px; font-weight: 600; color: var(--text); }
.rev-section-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Snapshot grid (10 cards) */
.rev-snapshot,
.mk-snapshot {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 1100px) {
  .rev-snapshot, .mk-snapshot { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .rev-snapshot, .mk-snapshot { grid-template-columns: repeat(2, 1fr); }
}
.rev-snap,
.mk-snap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 92px;
}
.rev-snap-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-2); font-weight: 500;
}
.rev-snap-value {
  font-family: var(--font-display, 'Gabarito', sans-serif);
  font-size: 22px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  line-height: 1.1; margin-top: 2px;
}
.rev-snap-delta {
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rev-snap-delta.pos { color: #1F8A5B; }
.rev-snap-delta.neg { color: #C44545; }
.rev-snap-delta.flat { color: var(--text-3); }
.mk-snap-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }


.bk-axis-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2, #f3efe6);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
}

.mk-snap-sub-bk { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.rev-subtabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-top: 16px;
  overflow-x: auto;
}
.rev-subtab {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.rev-subtab:hover { color: var(--text); }
.rev-subtab.on { color: var(--text); border-bottom-color: #1F8A5B; }

.bk-stack { display: flex; flex-direction: column; gap: 12px; }
.bk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.bk-card {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e1d8);
  border-radius: 8px;
  padding: 14px 16px;
}
.bk-card-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.bk-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.bk-card-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.bk-controls { display: flex; gap: 8px; align-items: center; }
.bk-segm {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.bk-segm.small button { padding: 4px 8px; font-size: 11px; }
.bk-segm button {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.bk-segm button:last-child { border-right: 0; }
.bk-segm button.on { background: var(--text); color: var(--surface, #fff); }

.bk-date-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.bk-date-input input {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text);
  font-family: inherit;
  min-width: 160px;
}

.bk-chart { display: block; }

.bk-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.bk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bk-leg-line {
  display: inline-block;
  width: 20px;
  height: 2px;
}
.bk-leg-line.solid { background: var(--text); }
.bk-leg-line.dashed {
  background: repeating-linear-gradient(to right, var(--text-3) 0 4px, transparent 4px 8px);
  height: 2px;
}
.bk-leg-band {
  display: inline-block;
  width: 20px;
  height: 8px;
  background: var(--text-3);
  opacity: 0.18;
  border-radius: 2px;
}
.bk-leg-sw {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.bk-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.bk-tbl th {
  text-align: left;
  font-weight: 500;
  color: var(--text-3);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bk-tbl th.r, .bk-tbl td.r { text-align: right; }
.bk-tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.bk-tbl tr:hover td { background: var(--surface-2, #f9f7f0); }
.bk-tbl tr.warn td { background: rgba(217, 119, 87, 0.06); }
.bk-tbl td.dim, .bk-tbl .dim { color: var(--text-3); }
.bk-tbl td.warn-text { color: #C44545; font-weight: 600; }

.bk-pickup-pos { color: #1F8A5B; font-weight: 600; }
.bk-pickup-zero { color: var(--text-3); }

.bk-heat-wrap {
  position: relative;
  padding-top: 18px;
}
.bk-heat-axis {
  position: relative;
  height: 16px;
  margin-left: 80px;
}
.bk-heat-axis span {
  position: absolute;
  font-size: 10px;
  color: var(--text-3);
  transform: translateX(-50%);
}
.bk-heat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.bk-heat-rowlbl {
  width: 80px;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  flex-shrink: 0;
}
.bk-heat-cells {
  display: grid;
  grid-template-columns: repeat(90, 1fr);
  gap: 1px;
  flex: 1;
}
.bk-heat-cell {
  height: 16px;
  border-radius: 1px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.bk-heat-cell.s-b { background: #1F8A5B; }
.bk-heat-cell.s-a { background: var(--surface-2, #f0ebe0); border: 1px solid var(--border); }
.bk-heat-cell.s-c { background: #D97757; }
.bk-heat-cell.s-l { background: #E5C76B; }
.bk-heat-cell.dim { opacity: 0.18; }
.bk-heat-cell:hover { transform: scaleY(1.4); z-index: 1; }
.bk-heat-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.bk-heat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bk-heat-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.bk-heat-swatch.s-b { background: #1F8A5B; }
.bk-heat-swatch.s-a { background: var(--surface-2, #f0ebe0); border: 1px solid var(--border); }
.bk-heat-swatch.s-c { background: #D97757; }
.bk-heat-swatch.s-l { background: #E5C76B; }

.bk-insight {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.5;
}
.bk-insight.alert { color: #C44545; }

.bk-lead-bar-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 18px;
}
.bk-lead-bar {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
}
.bk-lead-bar-val {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
}

/* Bars */
.bk-bars { display: flex; flex-direction: column; gap: 8px; }
.bk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bk-bar-lbl {
  font-size: 12px;
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}
.bk-bar-lbl-l { width: 110px; text-align: left; }
.bk-bar-fill {
  height: 22px;
  background: var(--text-2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  position: relative;
  min-width: 36px;
}
.bk-bar-val {
  font-size: 11px;
  color: var(--surface, #fff);
  font-weight: 600;
}
.bk-bar.dom .bk-bar-fill { background: #1F8A5B; }
.bk-bar.warn .bk-bar-fill { background: #D97757; }
.bk-bar.good .bk-bar-fill { background: #1F8A5B; }
.bk-bar:not(.dom) .bk-bar-lbl { width: 36px; }

/* Stack 100% bars */
.bk-stack-100 {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  margin-top: 8px;
}
.bk-stack-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bk-stack-bar {
  width: 100%;
  height: 160px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 2px;
  overflow: hidden;
}
.bk-stack-seg { width: 100%; }
.bk-stack-lbl {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
}

/* DoW chart */
.bk-dow-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bk-dow-h { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.bk-dow-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.bk-dow-lbl { width: 24px; font-size: 11px; color: var(--text-3); }
.bk-dow-bar { flex: 1; background: var(--surface-2, #f3efe6); height: 14px; border-radius: 2px; }
.bk-dow-fill { height: 100%; border-radius: 2px; }
.bk-dow-fill.arr { background: #1F8A5B; }
.bk-dow-fill.dep { background: #4285F4; }
.bk-dow-val { width: 36px; text-align: right; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Matrix */
.bk-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 12px;
}
.bk-matrix th {
  font-weight: 500;
  color: var(--text-3);
  padding: 4px;
  font-size: 11px;
}
.bk-matrix th.row-h { text-align: right; padding-right: 8px; }
.bk-matrix-cell {
  text-align: center;
  padding: 8px 6px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Funnel */
.bk-funnel { display: flex; flex-direction: column; gap: 6px; }
.bk-funnel-row {
  height: 32px;
  background: var(--surface-2, #f3efe6);
  border-radius: 3px;
  overflow: hidden;
}
.bk-funnel-bar {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 80px;
}

/* Empty states */
.bk-empty .bk-empty-body {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-3);
}
.bk-empty-icon {
  font-size: 36px;
  color: var(--text-3);
  opacity: 0.4;
  margin-bottom: 10px;
}
.bk-empty-msg { font-size: 13px; line-height: 1.5; max-width: 360px; margin: 0 auto; }

/* Skeleton */
.bk-skel { display: flex; flex-direction: column; gap: 12px; padding: 20px 0; }
.bk-skel-card {
  height: 220px;
  background: linear-gradient(90deg, var(--surface-2, #f3efe6) 0%, var(--border) 50%, var(--surface-2, #f3efe6) 100%);
  background-size: 200% 100%;
  animation: bk-skel-shimmer 1.6s infinite linear;
  border-radius: 8px;
}
@keyframes bk-skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile */
@media (max-width: 720px) {
  .bk-grid-2 { grid-template-columns: 1fr; }
  .bk-dow-pair { grid-template-columns: 1fr; }
  .bk-heat-rowlbl { width: 60px; font-size: 11px; }
  .bk-heat-cells { grid-template-columns: repeat(45, 1fr); }
}

/* Snapshot alert ring */
.rev-snap.alert {
  border-color: #D97757;
  background: rgba(217, 119, 87, 0.04);
}
