/* Modal offertadodia — funil pagamento/ + pré-visualização admin */

.otd-overlay {
  --otd-overlay-bg: rgba(15, 23, 42, 0.72);
  --otd-modal-bg: #ffffff;
  --otd-text: #1e293b;
  --otd-muted: #475569;
  --otd-badge-bg: #fef3c7;
  --otd-badge-text: #b45309;
  --otd-price: #0f766e;
  --otd-cta-bg: #f59e0b;
  --otd-cta-text: #1c1917;
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--otd-overlay-bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.otd-overlay--open {
  opacity: 1;
  visibility: visible;
}

.otd-overlay:not([hidden]) {
  pointer-events: auto;
  touch-action: none;
}

.otd-overlay--hold .otd-modal {
  visibility: hidden;
  pointer-events: none;
}

.otd-hold {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.otd-hold[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.otd-hold-card {
  max-width: 340px;
  width: 100%;
  padding: 1.15rem 1.25rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%);
  border: 2px solid #fecaca;
  box-shadow: 0 18px 48px rgba(127, 29, 29, 0.18);
  text-align: center;
}

.otd-hold-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #991b1b;
  background: #fee2e2;
  animation: q7m2BrHoldAlertPulse 1.2s ease-in-out infinite;
}

.otd-hold-alert-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
  animation: q7m2BrHoldDotPing 1.2s ease-out infinite;
}

.otd-hold-spinner {
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 auto 0.75rem;
  border: 3px solid #fecaca;
  border-top-color: #dc2626;
  border-right-color: #ea580c;
  border-radius: 50%;
  animation: q7m2BrHoldSpin 0.65s linear infinite;
}

.otd-hold-text {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  color: #7f1d1d;
}

.otd-hold-bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.otd-hold-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #dc2626, #ea580c, #f59e0b);
  animation: q7m2BrHoldBar 2s ease forwards;
}

@keyframes q7m2BrHoldAlertPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.15);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
  }
}

@keyframes q7m2BrHoldDotPing {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
}

.otd-modal {
  position: relative;
  width: min(100%, 420px);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 0;
  border-radius: 16px;
  background: var(--otd-modal-bg);
  color: var(--otd-text);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
}

.otd-modal-head {
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.otd-ect-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem 0.35rem;
  background: #fff;
}

.otd-ect-logo {
  display: block;
  width: auto;
  max-width: 140px;
  height: 29px;
}

.otd-rfb-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0.75rem 0.55rem;
  padding: 0.48rem 0.85rem;
  background: linear-gradient(135deg, #0d2847 0%, #003157 100%);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 25, 55, 0.12);
}

.otd-rfb-logo {
  flex-shrink: 0;
}

.otd-rfb-nome {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.otd-modal-content {
  padding: 1.1rem 1.35rem 1.15rem;
}

.otd-urgency {
  margin: -0.35rem 0 0.85rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: #9a3412;
  background: #ffedd5;
}

.otd-urgency--pulse {
  animation: q7m2BrUrgencyPulse 1.6s ease-in-out infinite;
}

.otd-badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--otd-badge-text);
  background: var(--otd-badge-bg);
}

.otd-title {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--otd-text);
}

.otd-body {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--otd-muted);
}

.otd-price {
  margin: 0 0 1rem;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--otd-price);
}

.otd-err {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.82rem;
  color: #b91c1c;
}

.otd-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.otd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.otd-btn--prim {
  color: var(--otd-cta-text);
  background: var(--otd-cta-bg);
}

.otd-btn--sec {
  color: var(--otd-muted);
  background: transparent;
}

.otd-btn--prim:hover {
  filter: brightness(1.04);
}

.otd-btn--prim:active {
  transform: scale(0.98);
}

.otd-overlay[data-br-animation='pop'] .otd-modal {
  animation: q7m2BrModalPop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.otd-overlay[data-br-animation='slideUp'] .otd-modal {
  animation: q7m2BrModalSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.otd-overlay[data-br-animation='shakeOnce'] .otd-modal {
  animation: q7m2BrModalShake 0.55s ease;
}

.otd-overlay[data-br-animation='urgencyPulse'] .otd-modal {
  animation: q7m2BrModalPop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.otd-overlay[data-br-animation='none'] .otd-modal {
  animation: none;
}

@keyframes q7m2BrOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes q7m2BrModalPop {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes q7m2BrModalSlideUp {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes q7m2BrModalShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@keyframes q7m2BrHoldSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes q7m2BrHoldBar {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes q7m2BrUrgencyPulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(251, 146, 60, 0);
  }
  50% {
    opacity: 0.92;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .otd-overlay.otd-overlay--open {
    animation: q7m2BrOverlayIn 0.15s ease forwards;
  }

  .otd-overlay .otd-modal {
    animation: none !important;
  }

  .otd-badge,
  .otd-btn--prim,
  .otd-urgency--pulse,
  .otd-hold-spinner,
  .otd-hold-bar-fill {
    animation: none !important;
  }

  .otd-hold-bar-fill {
    width: 100%;
  }
}

/* Admin — stats compactos (coluna Ativação) */
.painel-br-top-col--activation .painel-br-stats {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.painel-br-stats-account {
  margin-bottom: 0.75rem;
}

.painel-br-stats-account-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  color: #64748b;
}

.painel-br-stats-account-label strong {
  color: #0f172a;
}

.painel-br-stats-account-table-wrap {
  max-height: 140px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.painel-br-stats-account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}

.painel-br-stats-account-table th,
.painel-br-stats-account-table td {
  padding: 0.32rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.painel-br-stats-account-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  z-index: 1;
}

.painel-br-stats-account-table tbody tr[data-account-id] {
  cursor: pointer;
}

.painel-br-stats-account-table tbody tr[data-account-id]:hover {
  background: #f8fafc;
}

.painel-br-stats-account-table tbody tr.is-selected {
  background: #ecfdf5;
}

.painel-br-stats-account-table tbody tr.is-selected .painel-br-stats-account-mark {
  color: #0f766e;
}

.painel-br-stats-account-mark {
  color: transparent;
  font-size: 0.55rem;
}

.painel-br-stats-title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.painel-br-stats-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.painel-br-stats-seg {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.painel-br-stats-seg.is-active {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
}

.painel-br-stats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  color: #64748b;
}

.painel-br-stats-chip strong {
  color: #0f172a;
  font-weight: 700;
}

.painel-br-stats-chip--conv strong {
  color: #0f766e;
}

.painel-br-stats-table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.painel-br-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  line-height: 1.3;
}

.painel-br-stats-table th,
.painel-br-stats-table td {
  padding: 0.35rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.painel-br-stats-table td:nth-child(5) {
  white-space: normal;
  max-width: 11rem;
  word-break: break-all;
}

.painel-br-stats-email--internal {
  color: #64748b;
  font-style: italic;
}

.painel-br-stats-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  z-index: 1;
}

.painel-br-stats-empty {
  text-align: center;
  color: #94a3b8;
  padding: 0.75rem !important;
}

.painel-br-stats-hint {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

.painel-br-panel--portal {
  margin-top: 1rem;
}

.painel-br-portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .painel-br-portal-grid {
    grid-template-columns: 1fr;
  }
}

.painel-br-portal-appearance .painel-h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}

.otd-modal--retention .otd-body {
  font-size: 1rem;
  font-weight: 700;
  color: #991b1b;
  line-height: 1.5;
}

.otd-modal--retention .otd-title {
  color: #0f172a;
}

.otd-modal--retention .otd-badge,
.otd-modal--retention .otd-price {
  display: none !important;
}

.otd-modal--retention .otd-btn--prim {
  --otd-cta-bg: #ffcd00;
  --otd-cta-text: #003087;
  border: 2px solid #003087;
  font-weight: 700;
}

.otd-modal--retention .otd-btn--prim:hover {
  filter: brightness(0.96);
}

.otd-modal--retention .otd-btn--prim:active {
  filter: brightness(0.92);
}

.painel-br-allow-block {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.painel-br-allow-toggle--on .painel-x9-toggle-state {
  color: #0f766e;
}

.painel-br-allow-flash.painel-msg--ok {
  color: #0f766e;
}

.painel-header--br-user {
  margin-bottom: 0.35rem;
}

.painel-br-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: #475569;
}

.painel-br-user-meta-k {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.painel-br-user-meta-item--accounts {
  flex: 1 1 12rem;
  min-width: 0;
}

.painel-br-user-accounts-list {
  display: inline;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.painel-br-user-accounts-hint {
  display: inline;
  font-weight: 600;
  font-size: 0.82rem;
  color: #64748b;
}

.painel-br-user-period {
  margin-top: 0.85rem;
}

.painel-br-user-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.painel-br-user-hero-card {
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}

.painel-br-user-hero-card--revenue {
  border-color: #fcd34d;
  background: linear-gradient(165deg, #fffbeb 0%, #ffffff 55%);
}

.painel-br-user-hero-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.painel-br-user-hero-val {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f766e;
  line-height: 1.15;
}

.painel-br-user-hero-val--muted {
  font-size: 1.35rem;
  color: #0f172a;
}

.painel-br-user-hero-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
}

.painel-br-user-status--paid {
  color: #0f766e;
  font-weight: 700;
}

.painel-br-user-status--expired {
  color: #b91c1c;
  font-weight: 600;
}

.painel-br-user--loading {
  opacity: 0.72;
  pointer-events: none;
}

.painel-br-portal-metrics-grid--user {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.painel-br-user-pix-stats {
  margin-top: 1.25rem;
}

.painel-br-stats-chips--user {
  margin: 0.65rem 0 0.85rem;
}

.painel-br-user-table {
  font-size: 0.88rem;
}

.painel-br-user-email {
  max-width: 12rem;
  font-size: 0.78rem;
  word-break: break-all;
}

.painel-br-portal-metrics {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.painel-br-portal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.painel-br-portal-metric {
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  background: #f1f5f9;
}

.painel-br-portal-metric--muted {
  background: #f8fafc;
  opacity: 0.92;
}

.painel-br-portal-metric-val {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.painel-br-portal-metric-label {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  .painel-br-portal-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
