.kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kpi-card {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.kpi-card:hover { z-index: 2; border-color: rgba(37, 99, 235, .25); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.kpi-card::after { position: absolute; right: -24px; bottom: -38px; width: 92px; height: 92px; border-radius: 50%; background: var(--card-soft, rgba(37,99,235,.08)); content: ""; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpi-label { color: var(--text-soft); font-size: 9px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.kpi-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; background: var(--card-soft, var(--primary-soft)); color: var(--card-accent, var(--primary)); font-size: 12px; }
.kpi-value { display: block; margin-top: 14px; font-size: clamp(18px, 1.5vw, 25px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.kpi-meta { display: flex; align-items: center; gap: 6px; margin-top: 11px; color: var(--text-soft); font-size: 9px; font-weight: 650; }
.kpi-meta strong { font-weight: 800; }
.kpi-meta.positive strong { color: var(--success); }
.kpi-meta.negative strong { color: var(--danger); }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chart-card,
.table-card,
.pivot-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.chart-card { transition: border-color var(--transition), box-shadow var(--transition); }
.chart-card:hover { border-color: rgba(37,99,235,.22); box-shadow: var(--shadow-md); }
.chart-wide { grid-column: span 1; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-heading span { display: block; margin-bottom: 4px; color: var(--text-soft); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.card-heading h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.card-heading > i { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 12px; }
.trend-card-actions { display: flex; align-items: center; gap: 8px; }
.chart-heading-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 12px; }
.ams6-toggle { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); color: var(--text-soft); font-size: 9px; font-weight: 800; letter-spacing: .035em; transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition); }
.ams6-toggle i { color: var(--text-soft); font-size: 13px; }
.ams6-toggle b { min-width: 18px; color: var(--text-soft); font-size: 8px; }
.ams6-toggle:hover { border-color: rgba(6,182,212,.42); color: var(--info); transform: translateY(-1px); }
.ams6-toggle.active { border-color: rgba(6,182,212,.3); background: rgba(6,182,212,.11); color: var(--info); }
.ams6-toggle.active i, .ams6-toggle.active b { color: var(--info); }
.chart-wrap { position: relative; height: 285px; }
.chart-wrap.chart-lg { height: 330px; }
.chart-wrap.chart-tall { height: 480px; }

.insight-section { margin-top: 24px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 13px; }
.section-title-row h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 9px; font-weight: 700; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(16,185,129,.1); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } }

.insight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.insight-card { position: relative; min-height: 174px; overflow: hidden; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.insight-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--insight-accent, var(--primary)); content: ""; }
.insight-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.insight-head span:first-child { color: var(--text-soft); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.insight-head i { color: var(--insight-accent, var(--primary)); }
.insight-value { display: block; margin: 14px 0 6px; font-size: 16px; font-weight: 800; letter-spacing: -.025em; }
.insight-card p { margin: 0; color: var(--text-soft); font-size: 10px; line-height: 1.6; }
.insight-action { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--text); font-size: 9px; font-weight: 700; line-height: 1.5; }

.table-card { margin-top: 14px; }
.table-card .table-responsive { padding-bottom: 4px; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-hover-bg: var(--primary-soft); margin-bottom: 0; font-size: 10px; }
.table thead th { padding: 11px 10px; border-bottom: 1px solid var(--line); background: var(--surface-muted); color: var(--text-soft); font-size: 8px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.table tbody td { padding: 10px; border-color: var(--line); vertical-align: middle; white-space: nowrap; }
.dt-container .dt-search input, .dt-container .dt-length select { border-color: var(--line); border-radius: 9px; background: var(--surface-solid); color: var(--text); }
.dt-container .dt-info, .dt-container .dt-length, .dt-container .dt-search { color: var(--text-soft); font-size: 10px; }
.dt-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dt-buttons .btn { border-color: var(--line); background: var(--surface-muted); color: var(--text-soft); font-size: 9px; }
.pagination { --bs-pagination-bg: var(--surface-solid); --bs-pagination-border-color: var(--line); --bs-pagination-color: var(--text-soft); --bs-pagination-hover-bg: var(--primary-soft); --bs-pagination-hover-color: var(--primary); --bs-pagination-active-bg: var(--primary); }

/* Monthly Meeting regional scorecard */
.meeting-export-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, #2563eb 8%), color-mix(in srgb, var(--surface) 94%, #8b5cf6 6%));
  box-shadow: var(--shadow-sm);
}
.meeting-export-toolbar > div { display: grid; gap: 2px; }
.meeting-export-toolbar strong { color: var(--text); font-size: 12px; font-weight: 800; }
.meeting-export-toolbar small { color: var(--text-soft); font-size: 9px; }
.meeting-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(37,99,235,.45);
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(37,99,235,.2);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.meeting-export-button:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(37,99,235,.28); }
.meeting-export-button:focus-visible { outline: 3px solid rgba(37,99,235,.24); outline-offset: 2px; }
.meeting-export-button:disabled { cursor: wait; opacity: .7; transform: none; }
.meeting-export-button.is-loading i { animation: meeting-export-spin .8s linear infinite; }
@keyframes meeting-export-spin { to { transform: rotate(360deg); } }

.meeting-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.meeting-scorecard { grid-column: 1 / -1; order: 1; }
.meeting-channel-card { order: 2; }
.meeting-focus-card { order: 3; }
.meeting-focus-card .meeting-product-chart-wrap { height: 405px; min-height: 360px; }
.meeting-channel-card,
.meeting-scorecard {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.meeting-channel-card::before,
.meeting-scorecard::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 52%, #14b8a6 100%);
  content: "";
}
.meeting-channel-card::before { background: linear-gradient(90deg, #ec4899 0%, #8b5cf6 55%, #4c1d95 100%); }
.meeting-channel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.meeting-channel-header h2 { margin: 3px 0 5px; font-size: clamp(17px, 1.45vw, 23px); font-weight: 800; letter-spacing: -.035em; }
.meeting-channel-header p { max-width: 420px; margin: 0; color: var(--text-soft); font-size: 9px; line-height: 1.55; }
.meeting-channel-period {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(236,72,153,.12), rgba(139,92,246,.1));
  text-align: right;
}
.meeting-channel-period span { color: var(--text-soft); font-size: 7px; font-weight: 850; letter-spacing: .11em; }
.meeting-channel-period strong { color: #8b5cf6; font-size: 11px; font-weight: 850; }
.meeting-channel-chart-wrap { position: relative; height: 405px; min-height: 360px; }
.meeting-product-section { margin-top: 14px; }
.meeting-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.meeting-product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.meeting-product-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #ec4899 0%, #8b5cf6 58%, #4c1d95 100%);
  content: "";
}
.meeting-product-card-wide { grid-column: 1 / -1; }
.meeting-product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.meeting-product-header h2 { margin: 3px 0 5px; font-size: clamp(16px, 1.35vw, 21px); font-weight: 800; letter-spacing: -.035em; }
.meeting-product-header p { max-width: 520px; margin: 0; color: var(--text-soft); font-size: 9px; line-height: 1.55; }
.meeting-product-period {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(236,72,153,.12), rgba(139,92,246,.1));
  text-align: right;
}
.meeting-product-period span { color: var(--text-soft); font-size: 7px; font-weight: 850; letter-spacing: .11em; }
.meeting-product-period strong { color: #8b5cf6; font-size: 11px; font-weight: 850; }
.meeting-product-chart-wrap { position: relative; height: 390px; min-height: 350px; }
.meeting-product-chart-wide { height: 360px; min-height: 330px; }
.meeting-product-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.meeting-product-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 720;
}
.meeting-product-footer i { color: #8b5cf6; }
.meeting-scorecard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.meeting-scorecard-header h2 { margin: 3px 0 5px; font-size: clamp(20px, 2vw, 28px); font-weight: 800; letter-spacing: -.04em; }
.meeting-scorecard-header p { margin: 0; color: var(--text-soft); font-size: 10px; line-height: 1.6; }
.meeting-period-chip {
  display: grid;
  min-width: 150px;
  gap: 3px;
  padding: 11px 14px;
  border: 1px solid rgba(37,99,235,.22);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(37,99,235,.13), rgba(6,182,212,.08));
  text-align: right;
}
.meeting-period-chip span { color: var(--text-soft); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.meeting-period-chip strong { color: var(--primary); font-size: 14px; font-weight: 800; }
.meeting-table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-solid);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.meeting-table-shell:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.meeting-performance-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.meeting-performance-table th,
.meeting-performance-table td {
  min-width: 96px;
  padding: 14px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.meeting-performance-table th:last-child,
.meeting-performance-table td:last-child { border-right: 0; }
.meeting-performance-table thead th {
  color: #dbeafe;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .045em;
  text-align: center;
  text-transform: uppercase;
}
.meeting-performance-table thead tr:first-child th { padding-top: 15px; padding-bottom: 15px; border-bottom-color: rgba(255,255,255,.16); font-size: 10px; }
.meeting-performance-table thead tr:nth-child(2) th { background: #172554; }
.meeting-dimension-head { background: linear-gradient(145deg, #111c35, #172554) !important; color: #fff !important; }
.meeting-current-group { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff !important; }
.meeting-ytd-group { background: linear-gradient(135deg, #0891b2, #0f766e); color: #fff !important; }
.meeting-sticky-region { left: 0; min-width: 112px !important; width: 112px; text-align: left !important; }
.meeting-sticky-ams6 { left: 112px; min-width: 104px !important; width: 104px; }
.meeting-performance-table thead .meeting-sticky-region,
.meeting-performance-table thead .meeting-sticky-ams6 { position: sticky; z-index: 4; }
.meeting-performance-table tbody .meeting-sticky-region,
.meeting-performance-table tbody .meeting-sticky-ams6,
.meeting-performance-table tfoot .meeting-sticky-region,
.meeting-performance-table tfoot .meeting-sticky-ams6 { position: sticky; z-index: 2; background: var(--surface-solid); }
.meeting-performance-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-muted) 72%, transparent); }
.meeting-performance-table tbody tr:nth-child(even) .meeting-sticky-region,
.meeting-performance-table tbody tr:nth-child(even) .meeting-sticky-ams6 { background: var(--surface-muted); }
.meeting-performance-table tbody tr { transition: background var(--transition); }
.meeting-performance-table tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 78%, var(--surface-solid)); }
.meeting-performance-table tbody tr:hover .meeting-sticky-region,
.meeting-performance-table tbody tr:hover .meeting-sticky-ams6 { background: color-mix(in srgb, var(--primary-soft) 78%, var(--surface-solid)); }
.meeting-region-cell strong { display: block; color: var(--text); font-size: 12px; font-weight: 850; }
.meeting-region-cell span { display: block; margin-top: 2px; color: var(--text-soft); font-size: 8px; font-weight: 700; }
.meeting-number { font-weight: 720; }
.meeting-achievement { display: inline-flex; min-width: 55px; align-items: center; justify-content: flex-end; gap: 6px; font-weight: 850; }
.meeting-achievement::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 13%, transparent); }
.meeting-positive { color: var(--success) !important; font-weight: 820; }
.meeting-negative { color: var(--danger) !important; font-weight: 820; }
.meeting-neutral { color: var(--text-soft) !important; }
.meeting-performance-table tfoot td {
  padding-top: 15px;
  padding-bottom: 15px;
  border-bottom: 0;
  background: linear-gradient(135deg, #172554, #0f2857);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}
.meeting-performance-table tfoot .meeting-sticky-region,
.meeting-performance-table tfoot .meeting-sticky-ams6 { z-index: 3; background: linear-gradient(135deg, #172554, #0f2857); color: #fff; }
.meeting-total-label { text-transform: uppercase; letter-spacing: .05em; }
.meeting-loading { height: 220px; color: var(--text-soft); text-align: center !important; }
.meeting-loading i { margin-right: 7px; color: var(--primary); }
.meeting-channel-footer,
.meeting-scorecard-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.meeting-channel-footer span,
.meeting-scorecard-footer span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-muted); color: var(--text-soft); font-size: 8px; font-weight: 720; }
.meeting-channel-footer i,
.meeting-scorecard-footer i { color: var(--primary); }

.pivot-card { min-height: 620px; }
.pivot-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.pivot-toolbar label { min-width: 220px; }
.pivot-clear-button { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; white-space: nowrap; }
.pivot-clear-button:hover { border-color: rgba(239, 68, 68, .42); background: rgba(239, 68, 68, .08); color: #ef4444; }
.pivot-fields-toggle { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; white-space: nowrap; }
.pivot-fields-toggle.is-collapsed { border-color: rgba(37, 99, 235, .36); color: var(--primary); }
.pivot-measure-order-toggle { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; white-space: nowrap; }
.pivot-measure-order-toggle.is-open { border-color: rgba(37, 99, 235, .48); background: var(--primary-soft); color: var(--primary); }
.pivot-total-toggles { display: inline-flex; align-items: center; gap: 6px; }
.pivot-total-toggle { display: inline-flex; min-height: 32px; align-items: center; gap: 6px; white-space: nowrap; }
.pivot-total-toggle b { min-width: 19px; color: var(--text-soft); font-size: 8px; letter-spacing: .04em; }
.pivot-total-toggle.is-active { border-color: rgba(37, 99, 235, .45); background: var(--primary-soft); color: var(--primary); }
.pivot-total-toggle.is-active b { color: var(--primary); }
.pivot-export-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.pivot-export-actions .btn { display: inline-flex; min-height: 32px; align-items: center; gap: 6px; white-space: nowrap; }
.pivot-measure-order-panel {
  max-width: 760px;
  margin: -8px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}
.pivot-measure-order-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.pivot-measure-order-heading > div { display: grid; gap: 2px; }
.pivot-measure-order-heading strong { color: var(--text); font-size: 11px; }
.pivot-measure-order-heading span { color: var(--text-soft); font-size: 9px; }
.pivot-measure-order-close {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text-soft);
}
.pivot-measure-order-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pivot-measure-order-item {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 4px 5px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-solid);
  color: var(--text);
  cursor: grab;
  user-select: none;
}
.pivot-measure-order-item:active { cursor: grabbing; }
.pivot-measure-order-item.is-dragging { opacity: .45; }
.pivot-measure-order-item.is-drag-over { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.pivot-measure-order-grip { color: var(--text-soft); font-size: 10px; }
.pivot-measure-order-name { font-size: 10px; font-weight: 700; white-space: nowrap; }
.pivot-measure-order-actions { display: inline-flex; gap: 3px; margin-left: 3px; }
.pivot-measure-order-actions button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 9px;
}
.pivot-measure-order-actions button:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.pivot-measure-order-actions button:disabled { opacity: .28; cursor: not-allowed; }
.pivot-measure-order-empty { color: var(--text-soft); font-size: 10px; }
.pivot-card.pivot-fields-collapsed .pvtUnused,
.pivot-card.pivot-fields-collapsed .pvtRows { display: none !important; }
.pivot-collapsed-controls {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}
.pivot-collapsed-controls .pvtVals,
.pivot-collapsed-controls .pvtCols {
  display: flex !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 7px !important;
  border: 0 !important;
  background: transparent !important;
}
.pivot-scroll { max-width: 100%; overflow: auto; padding-bottom: 14px; }
.pvtUi { color: var(--text); font-family: inherit; font-size: 10px; }
.pvtUi td, .pvtUi th { border-color: var(--line); background: var(--surface-solid); }
.pvtAxisContainer, .pvtVals { border-color: var(--line) !important; background: var(--surface-muted) !important; }
.pvtAttr { border-color: var(--line) !important; border-radius: 7px !important; background: var(--surface-solid) !important; color: var(--text) !important; box-shadow: none !important; }
.pvtTable { width: max-content; min-width: 100%; table-layout: auto; }
.pvtTable td.pvtVal,
.pvtTable td.pvtTotal,
.pvtTable th.pvtColLabel {
  min-width: 86px;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.pvtTable thead tr th, .pvtTable tbody tr th { background: var(--surface-muted); color: var(--text-soft); }
.pvtTable tbody tr td { background: var(--surface-solid); color: var(--text); }
.pvtTable .pivot-measure-total-label { min-width: 108px; white-space: nowrap; text-align: center; }
.pvtTable .pivot-measure-total { min-width: 108px; white-space: nowrap; text-align: right; font-weight: 750; }
.pvtTable .pivot-subtotal-label {
  border-top: 2px solid rgba(37, 99, 235, .28);
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  font-weight: 800;
  text-align: left;
}
.pvtTable .pivot-subtotal-value,
.pvtTable .pivot-subtotal-measure {
  border-top: 2px solid rgba(37, 99, 235, .28);
  background: color-mix(in srgb, var(--primary-soft) 52%, var(--surface-solid)) !important;
  color: var(--text);
  font-weight: 750;
  white-space: pre-line;
}
.pivot-result-shell {
  position: relative;
  width: min(1100px, 75vw);
  min-width: 0;
}
.pivot-scroll-topbar,
.pivot-scroll-body {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
}
.pivot-scroll-topbar {
  position: relative;
  z-index: 13;
  height: 17px;
  grid-template-rows: 17px;
}
.pivot-scroll-body {
  align-items: start;
  grid-template-rows: auto;
}
.pivot-scroll-corner {
  grid-column: 1;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 0;
  background: var(--surface-muted);
}
.pivot-top-scroll {
  grid-column: 2;
  width: 100%;
  height: 17px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 0 8px 0 0;
  background: var(--surface-muted);
  scrollbar-color: var(--primary) var(--surface-muted);
  scrollbar-width: auto;
}
.pivot-top-scroll-track { height: 1px; }
.pivot-top-scroll::-webkit-scrollbar { height: 12px; }
.pivot-top-scroll::-webkit-scrollbar-track { border-radius: 999px; background: var(--surface-muted); }
.pivot-top-scroll::-webkit-scrollbar-thumb { border: 3px solid var(--surface-muted); border-radius: 999px; background: var(--primary); }
.pivot-left-scroll {
  grid-column: 1;
  width: 18px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  border: 1px solid var(--line);
  border-top: 0;
  border-right: 0;
  border-radius: 0 0 0 10px;
  background: var(--surface-muted);
  scrollbar-color: var(--primary) var(--surface-muted);
  scrollbar-width: auto;
}
.pivot-left-scroll-track { width: 1px; }
.pivot-left-scroll::-webkit-scrollbar { width: 12px; }
.pivot-left-scroll::-webkit-scrollbar-track { background: var(--surface-muted); }
.pivot-left-scroll::-webkit-scrollbar-thumb { border: 3px solid var(--surface-muted); border-radius: 999px; background: var(--primary); }
.pivot-table-viewport {
  grid-column: 2;
  width: 100%;
  max-height: clamp(420px, 68vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--surface-solid);
  scrollbar-width: none;
}
.pivot-table-viewport:focus-visible,
.pivot-top-scroll:focus-visible,
.pivot-left-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pivot-table-viewport::-webkit-scrollbar { width: 0; height: 0; }

/* PivotTable.js menempatkan popup filter langsung di <body>. Pertahankan
   kontras hitam di atas panel putih pada light maupun dark mode. */
.pvtFilterBox,
.pvtFilterBox h4,
.pvtFilterBox label,
.pvtFilterBox p,
.pvtFilterBox span,
.pvtFilterBox .pvtCheckContainer {
  color: #111827 !important;
}
.pvtFilterBox input[type="text"] {
  border: 1px solid #9ca3af !important;
  background: #ffffff !important;
  color: #111827 !important;
}
.pvtFilterBox input[type="text"]::placeholder { color: #111827 !important; opacity: 1; }
.pvtFilterBox button {
  border: 1px solid #9ca3af !important;
  background: #f3f4f6 !important;
  color: #111827 !important;
}
.pvtFilterBox button:hover { background: #e5e7eb !important; }

.loading-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); transition: opacity .28s ease, visibility .28s ease; }
.loading-overlay.hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.loading-card { width: min(390px, calc(100vw - 40px)); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-solid); box-shadow: var(--shadow-md); }
.loading-card > div:nth-child(2) { display: inline-flex; width: calc(100% - 62px); margin-left: 12px; flex-direction: column; vertical-align: middle; }
.loading-card strong, .loading-card small { display: block; }
.loading-card small { margin-top: 4px; color: var(--text-soft); font-size: 10px; }
.loading-logo { display: inline-grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #3975ee, #1d4ed8); color: #fff; box-shadow: 0 10px 22px rgba(37,99,235,.25); }
.skeleton-line { height: 8px; margin-top: 20px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.skeleton-line::after { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(37,99,235,.35), transparent); content: ""; animation: loading 1.2s infinite; }
.skeleton-line.short { width: 72%; margin-top: 9px; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

.empty-state { display: grid; min-height: 220px; place-items: center; color: var(--text-soft); text-align: center; }
.empty-state i { display: block; margin-bottom: 9px; color: var(--primary); font-size: 24px; }
.positive { color: var(--success) !important; }
.negative { color: var(--danger) !important; }

@media (min-width: 1500px) {
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1600px) {
  .kpi-grid { grid-template-columns: repeat(7, minmax(140px, 1fr)); }
  .insight-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
  .kpi-grid { grid-template-columns: repeat(7, minmax(140px, 1fr)); }
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meeting-dashboard-grid { grid-template-columns: 1fr; }
  .meeting-scorecard { grid-column: auto; }
  .meeting-channel-chart-wrap { height: 390px; }
  .meeting-focus-card .meeting-product-chart-wrap { height: 390px; min-height: 350px; }
  .meeting-product-grid { grid-template-columns: 1fr; }
  .meeting-product-card-wide { grid-column: auto; }
}

@media (max-width: 767.98px) {
  .kpi-grid { grid-template-columns: repeat(7, minmax(132px, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr; }
  .chart-wide { grid-column: auto; }
  .chart-card, .table-card, .pivot-card { padding: 14px; }
  .chart-wrap, .chart-wrap.chart-lg { height: 290px; }
  .chart-wrap.chart-tall { height: 430px; }
  .insight-grid { grid-template-columns: 1fr; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .pivot-toolbar { align-items: stretch; flex-direction: column; }
  .pivot-toolbar label { min-width: 0; }
  .pivot-total-toggles { width: 100%; }
  .pivot-total-toggle { flex: 1 1 0; justify-content: center; }
  .pivot-export-actions { margin-left: 0; }
  .meeting-channel-card, .meeting-scorecard { padding: 15px; }
  .meeting-export-toolbar { align-items: stretch; flex-direction: column; }
  .meeting-export-button { width: 100%; }
  .meeting-product-card { padding: 15px; }
  .meeting-channel-header { align-items: stretch; flex-direction: column; }
  .meeting-channel-period { width: 100%; text-align: left; }
  .meeting-channel-chart-wrap { height: 350px; min-height: 330px; }
  .meeting-product-header { align-items: stretch; flex-direction: column; }
  .meeting-product-period { width: 100%; text-align: left; }
  .meeting-product-chart-wrap, .meeting-product-chart-wide { height: 350px; min-height: 320px; }
  .meeting-scorecard-header { align-items: stretch; flex-direction: column; }
  .meeting-period-chip { width: 100%; text-align: left; }
  .meeting-performance-table th, .meeting-performance-table td { padding: 12px 10px; }
  .app-shell[data-page="monthly-meeting"] .global-filter { position: relative; top: auto; max-height: none; overflow: visible; }
  .app-shell[data-page="monthly-meeting"] .app-main { overflow-x: clip; }
}

@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: repeat(7, minmax(132px, 1fr)); }
  .kpi-card { min-height: 128px; }
  .ams6-toggle span { display: none; }
}
