/* ==========================================================================
   Bolsa Trading — SaaS Billing, Anti-Calote Wallet & Mercado Pago PIX UI
   ========================================================================== */

.client-billing-banner {
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(139, 92, 246, 0.09)),
    rgba(17, 19, 30, 0.92);
  border: 1px solid rgba(236, 72, 153, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.client-billing-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.billing-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.billing-stage-pill.is-trial {
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

.billing-stage-pill.is-live {
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.48);
  color: #f9a8d4;
}

.billing-stage-pill.is-paused {
  background: rgba(251, 113, 133, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fda4af;
}

.billing-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.billing-metric-card {
  background: rgba(8, 10, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.billing-metric-card span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.billing-metric-card strong {
  font-size: 1.05rem;
  color: #f8fafc;
}

.billing-plans-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.billing-plan-option {
  text-align: left;
  background: rgba(12, 14, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  color: #f8fafc;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.billing-plan-option:hover {
  border-color: rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
}

.billing-plan-option.is-selected {
  border-color: #ec4899;
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.16), rgba(139, 92, 246, 0.14));
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.35);
}

.billing-plan-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.billing-plan-option-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
}

.billing-plan-rate-chip {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
}

.billing-plan-option-desc {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.billing-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

/* PIX Checkout Modal */
.pix-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(5, 7, 14, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pix-modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  background: #141622;
  border: 1px solid rgba(236, 72, 153, 0.42);
  border-radius: 22px;
  padding: 24px;
  color: #f8fafc;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85);
}

.pix-modal-card::-webkit-scrollbar {
  display: none;
}

.pix-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.pix-quick-btn {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.pix-quick-btn.is-active,
.pix-quick-btn:hover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.18);
  color: #ffffff;
}

.pix-qr-stage {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.pix-qr-img {
  width: 196px;
  height: 196px;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px;
  margin: 0 auto 12px;
  display: block;
}

.pix-copy-input {
  width: 100%;
  font-size: 0.74rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  margin-bottom: 10px;
}

/* Master Admin Commercial Panel */
.saas-admin-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 32px;
}

.saas-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.saas-kpi-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(17, 19, 30, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-kpi-card span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.saas-kpi-card strong {
  font-size: 1.28rem;
  color: #ffffff;
}

.saas-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saas-subnav-btn {
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 19, 30, 0.75);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.saas-subnav-btn.is-active {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-color: transparent;
  color: #ffffff;
}

.saas-table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.saas-table-scroll::-webkit-scrollbar {
  display: none;
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.saas-table th,
.saas-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: middle;
}

.saas-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.saas-inline-drawer {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(10, 12, 22, 0.9);
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.saas-pwd-box {
  position: relative;
  display: flex;
  align-items: center;
}

.saas-pwd-box input {
  width: 100%;
  padding-right: 42px;
}

.saas-pwd-eye {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

.saas-form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.saas-full-row {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .billing-metrics-strip,
  .saas-kpi-grid,
  .saas-form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .billing-plans-selector {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .pix-quick-grid,
  .saas-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
