:root {
  --bg-dark: #0f111a;
  --bg-card: #181b29;
  --bg-hover: #22273d;
  --border: #2b304c;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-purple: #8b5cf6;
  --accent-purple-hover: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

.portal-wrapper {
  width: 100%;
  max-width: 900px;
  transition: max-width 0.25s ease;
}

body:has(#portal-plans-section:not([style*="display: none"])) .portal-wrapper,
.portal-wrapper.wide-layout {
  max-width: 1280px;
}

/* Header */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  background: var(--accent-gradient);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.portal-brand h1 {
  font-size: 20px;
  font-weight: 800;
}

.portal-brand h1 span {
  color: var(--accent-purple);
}

.portal-brand p {
  font-size: 13px;
  color: var(--text-muted);
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-plan {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-plan.free, .tag-plan.free {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-plan.starter, .tag-plan.starter {
  background: #8b5cf6;
  color: #fff;
}

.badge-plan.pro, .tag-plan.pro {
  background: #6366f1;
  color: #fff;
}

.badge-plan.black, .tag-plan.black {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
}

.badge-plan.safira, .tag-plan.safira {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.badge-plan.enterprise, .tag-plan.enterprise {
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
}

.user-email {
  font-size: 14px;
  color: var(--text-muted);
}

/* Cards */
.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.auth-card {
  max-width: 440px;
  margin: 40px auto;
}

/* Tabs de Autenticação (Entrar vs Criar Conta) */
.auth-tabs {
  display: flex;
  background: rgba(15, 18, 29, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab-btn.active {
  background: var(--accent-purple, #7c3aed);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

/* Banner de Indicação / Boas-Vindas */
.referral-welcome-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ref-banner-icon {
  font-size: 24px;
  line-height: 1;
}

.ref-banner-content {
  flex: 1;
}

.ref-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 3px;
}

.ref-banner-desc {
  font-size: 12.5px;
  color: var(--text-main, #e2e8f0);
  line-height: 1.4;
  margin-bottom: 6px;
}

.ref-code-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: #6ee7b7;
  font-family: monospace;
  font-weight: 600;
}

.badge-ref-bonus {
  display: inline-block;
  margin-top: 4px;
  font-size: 11.5px;
  color: #34d399;
  font-weight: 500;
}

.auth-footer-toggle {
  text-align: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.auth-footer-toggle a {
  color: #a78bfa;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-left: 4px;
}

.auth-footer-toggle a:hover {
  text-decoration: underline;
}

.terms-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 14px;
  line-height: 1.4;
}

.terms-checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent-purple, #7c3aed);
}

.terms-checkbox-label a {
  color: #a78bfa;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.terms-checkbox-label a:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* Modal de Instalação da Extensão Chrome */
.install-ext-card {
  max-width: 490px;
  text-align: center;
  padding: 30px 24px;
  animation: fadeInDown 0.3s ease;
}

.install-ext-header .install-ext-icon-wrap {
  font-size: 44px;
  margin-bottom: 12px;
  line-height: 1;
}

.install-ext-header h3 {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.install-ext-header .subtitle {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.install-steps-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  background: rgba(15, 18, 29, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.install-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-purple, #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-text-content strong {
  display: block;
  font-size: 13.5px;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.step-text-content p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-install-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  text-decoration: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-install-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.55);
}

/* Banner fixo de instalação no Dashboard */
.portal-ext-install-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(59, 130, 246, 0.14));
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ext-banner-icon {
  font-size: 32px;
  line-height: 1;
}

.ext-banner-content {
  flex: 1;
  min-width: 220px;
}

.ext-banner-content strong {
  display: block;
  font-size: 14.5px;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.ext-banner-content p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  background: #0f121d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus {
  border-color: var(--accent-purple);
}

.form-actions-inline {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.form-actions-inline a,
.btn-link {
  color: var(--accent-purple);
  font-size: 12px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.form-actions-inline a:hover,
.btn-link:hover {
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-purple-hover);
}

.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: #1f2937;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-google-auth:hover {
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.auth-divider-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.14));
}

.auth-divider-text {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: lowercase;
}

.btn-secondary {
  background: var(--bg-hover);
  color: #fff;
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #2a304d;
}

.btn-secondary-sm {
  background: var(--bg-hover);
  color: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-gradient {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* Alerts */
.alert-box {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}

.alert-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: #fca5a5;
}

.alert-box.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: #6ee7b7;
}

.alert-box.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--warning);
  color: #fde68a;
}

/* Plan Summary Card */
.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.tag-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.tag-status.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.license-key-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.license-key-text strong {
  color: var(--accent-purple);
  letter-spacing: 1px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-box {
  background: #111422;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.3;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* Slots List */
.slots-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #121524;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 10px;
}

.slot-item.empty {
  border-style: dashed;
  border-color: #3b4267;
  background: transparent;
}

.slot-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.slot-icon {
  font-size: 24px;
  background: var(--bg-hover);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.slot-title {
  font-size: 15px;
  font-weight: 600;
}

.slot-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.cooldown-text {
  font-size: 12px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}

.modal-card::-webkit-scrollbar-thumb {
  background: #2b304c;
  border-radius: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* ==========================================================================
   PORTAL CHECKOUT & PLANS STYLES (ASAAS HYBRID)
   ========================================================================== */

.portal-auth-cta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.portal-auth-cta span {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-gradient-sm {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-gradient-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.45);
}

.plans-portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.badge-tag {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.plans-hero-portal {
  text-align: center;
  margin-bottom: 32px;
}

.plans-hero-portal h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.plans-hero-portal p {
  font-size: 14px;
  color: var(--text-muted);
}

.plans-grid-portal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .plans-grid-portal {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .plans-grid-portal {
    grid-template-columns: 1fr;
  }
}

.portal-plan-item {
  position: relative;
  background: #131728;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.portal-plan-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-3px);
}

.featured-portal-plan {
  border: 2px solid var(--accent-purple);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, #131728 100%);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.18);
}

.ribbon-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  font-weight: 800;
  font-size: 10px;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.plan-badge-top {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  align-self: flex-start;
}

.plan-badge-top.badge-pro {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.2);
}

.portal-plan-item h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.price-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 8px;
}

.price-wrap .curr {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-purple);
}

.price-wrap .val {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.price-wrap .freq {
  font-size: 12px;
  color: var(--text-muted);
}

.portal-plan-item .desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  min-height: 32px;
  line-height: 1.4;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #e2e8f0;
  flex: 1;
}

.actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-portal-pay-pix {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
  text-align: center;
}

.btn-portal-pay-pix:hover {
  opacity: 0.92;
}

.btn-portal-pay-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #e2e8f0;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.btn-portal-pay-card:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Modal Checkout Pix Extras */
.modal-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-close:hover {
  color: #fff;
  background: var(--bg-hover);
}

.summary-box-portal {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
}

.summary-box-portal strong {
  color: var(--accent-purple);
  font-size: 15px;
}

.checkout-method-tabs {
  display: flex;
  background: #0f121d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 16px;
}

.tab-checkout-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tab-checkout-btn:hover {
  color: #fff;
}

.tab-checkout-btn.active {
  background: var(--accent-purple);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.card-section-divider {
  display: flex;
  align-items: center;
  margin: 16px 0 12px 0;
  text-align: center;
}

.card-section-divider::before,
.card-section-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.card-section-divider span {
  padding: 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 0.5px;
}

.form-row-2col {
  display: flex;
  gap: 12px;
}

.form-row-2col .form-group {
  flex: 1;
}

.form-row-3col {
  display: flex;
  gap: 10px;
}

.form-row-3col .form-group {
  flex: 1;
}

.form-row-4col {
  display: flex;
  gap: 8px;
}

.form-row-4col .form-group {
  flex: 1;
}

.required-star {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}

.btn-portal-select-plan {
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  text-align: center;
}

.btn-portal-select-plan:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.input-hint-badge {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  font-weight: 600;
  line-height: 1.3;
  transition: all 0.2s ease;
}

.input-hint-badge.loading {
  color: #60a5fa;
}

.input-hint-badge.success {
  color: #34d399;
}

.input-hint-badge.error {
  color: #f87171;
}

.input-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4) !important;
}

#portal-pix-modal .form-group input.input-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.field-error-text {
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.25;
  display: block;
}

.input-valid {
  border-color: #10b981 !important;
}

/* Banner de Reverse Trial 24h & Janela de 6h */
.portal-trial-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(139, 92, 246, 0.18) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
  animation: glowPulse 3s infinite alternate ease-in-out;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.15); }
  100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.35); }
}

.trial-banner-icon {
  font-size: 26px;
  line-height: 1;
}

.trial-banner-content {
  flex: 1;
}

.trial-banner-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 4px;
}

.trial-banner-content p {
  font-size: 12px;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.4;
}

.trial-banner-action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trial-countdown-badge {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.btn-trial-upgrade {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, filter 0.2s;
}

.btn-trial-upgrade:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-portal-open-free {
  border: 1px dashed rgba(255, 255, 255, 0.3) !important;
  color: #e2e8f0 !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.btn-portal-open-free:hover {
  border-color: #a78bfa !important;
  background: rgba(167, 139, 250, 0.1) !important;
  color: #fff !important;
}

#portal-pix-modal {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#portal-pix-modal .modal-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
  max-width: 530px;
  width: 100%;
  padding: 0 !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

#portal-pix-modal .modal-card::-webkit-scrollbar {
  width: 6px;
}

#portal-pix-modal .modal-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* 1. Barra Superior com Resumo do Plano e Troca de Plano */
.checkout-plan-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-plan-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.checkout-plan-tag {
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  border: 1px solid #dbeafe;
}

.checkout-plan-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.checkout-plan-price {
  font-size: 15px;
  font-weight: 800;
  color: #059669;
}

.btn-change-plan {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-change-plan:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1d4ed8;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#portal-pix-modal .btn-close {
  color: #64748b;
  font-size: 18px;
  font-weight: 700;
}

#portal-pix-modal .btn-close:hover {
  color: #0f172a;
  background: #e2e8f0;
}

/* 2. Stepper Visual de 3 Passos */
.checkout-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  position: relative;
  flex: 1;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease, color 0.25s ease;
}

.step-item.active .step-circle {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.step-item.active .step-label {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  color: #2563eb;
  font-weight: 700;
}

.step-item.completed .step-circle {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.step-item.completed .step-label {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  color: #059669;
  font-weight: 600;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px 16px 4px;
  transition: background 0.25s ease;
}

.step-line.completed {
  background: #10b981;
}

/* 3. Corpo e Formulários do Checkout Claro */
.checkout-body-content {
  padding: 16px 20px;
}

.step-panel-header {
  margin-bottom: 12px;
}

.step-panel-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 3px 0;
}

.step-panel-header p {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
}

#portal-pix-modal .form-group {
  margin-bottom: 11px;
}

#portal-pix-modal .form-group label {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

#portal-pix-modal .form-group input {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  width: 100%;
  transition: all 0.2s ease;
}

#portal-pix-modal .form-group input::placeholder {
  color: #94a3b8;
}

#portal-pix-modal .form-group input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#portal-pix-modal .checkout-method-tabs {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 16px;
}

#portal-pix-modal .tab-checkout-btn {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 8px;
  border-radius: 6px;
}

#portal-pix-modal .tab-checkout-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

#portal-pix-modal .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  padding: 12px 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#portal-pix-modal .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-text-back {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.btn-text-back:hover {
  color: #0f172a;
}

/* Pix Display Step Claro */
.pix-light-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 14px;
}

/* Layout horizontal: QR à esquerda, info à direita */
.pix-light-box.pix-side-layout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
}

.pix-side-layout .pix-qr-container {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.pix-side-layout .pix-qr-img {
  width: 128px;
  height: 128px;
}

.pix-side-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pix-side-info .radar-status-box {
  margin-top: 0;
}

.pix-qr-container {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  position: relative;
}

/* QR clicável */
.pix-qr-zoomable {
  cursor: zoom-in;
}

.pix-qr-zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.pix-qr-zoomable:hover .pix-qr-zoom-hint {
  opacity: 1;
}

/* Lightbox QR Code */
.qr-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}

.qr-zoom-box {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-width: 340px;
  width: 90%;
  animation: qr-zoom-in 0.18s ease;
}

@keyframes qr-zoom-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.qr-zoom-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.qr-zoom-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.qr-zoom-label {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-bottom: 4px;
}

.qr-zoom-img-wrap {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
}

.qr-zoom-img {
  width: 260px;
  height: 260px;
  display: block;
}

.pix-qr-img {
  width: 175px;
  height: 175px;
  display: block;
}

.pix-value-tag {
  font-size: 14px;
  font-weight: 800;
  color: #059669;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.checkout-copiacola-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.checkout-copiacola-row .code-copiacola-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 42px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 8px;
  padding: 8px 12px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.checkout-copiacola-row .code-copiacola-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.checkout-copiacola-row .btn-copy-pix {
  flex: 0 0 auto;
  height: 42px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  padding: 0 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.checkout-copiacola-row .btn-copy-pix:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

.radar-status-box {
  padding: 11px 14px;
  background: #ecfdf5;
  border: 1px dashed #6ee7b7;
  border-radius: 8px;
  font-size: 12px;
  color: #065f46;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.checkout-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* 4. Rodapé Seguro Hotmart / E-commerce Style */
.checkout-secure-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 20px;
}

.secure-badges-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.secure-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.secure-badge-item .badge-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.secure-badge-item.badge-ssl .badge-icon-wrap {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #059669;
}

.secure-badge-item.badge-guarantee .badge-icon-wrap {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #2563eb;
}

.secure-badge-item.badge-instant .badge-icon-wrap {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #d97706;
}

.secure-badge-item strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.secure-badge-item span {
  display: block;
  font-size: 10px;
  color: #64748b;
  line-height: 1.25;
}

.payment-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pay-icon-tag {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.pay-icon-tag.pix {
  color: #059669;
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.pay-icon-tag.visa {
  color: #1a1f71;
  font-style: italic;
  font-weight: 900;
}

.pay-icon-tag.mastercard {
  color: #eb001b;
  font-weight: 900;
}

.pay-icon-tag.elo {
  color: #00a4e4;
  font-weight: 900;
}

.pay-icon-tag.hipercard {
  color: #b3141a;
  font-weight: 900;
}

.pay-icon-tag.amex {
  color: #006fcf;
  font-weight: 900;
}

.secure-footer-disclaimer {
  font-size: 10.5px;
  color: #64748b;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* Animação reticências "Processando..." */
@keyframes processing-ellipsis {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

.processing-dots::after {
  content: '';
  animation: processing-ellipsis 1.2s steps(1, end) infinite;
}

/* Animação radar do PIX (pulse) */
@keyframes radar-pulse {
  0%   { transform: scale(1); opacity: 1; }
  70%  { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.radar-dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  position: relative;
  flex-shrink: 0;
}

.radar-dot-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #10b981;
  animation: radar-pulse 1.8s ease-out infinite;
}

/* ==========================================
   Anti-Bot Honeypot Trap (Invisível para humanos)
   ========================================== */
.hp-trap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* ==========================================
   Language Selector (i18n) no Header do Portal
   ========================================== */
.portal-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-selector-wrap {
  position: relative;
}

.btn-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-lang-pill:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.15);
}

.lang-arrow {
  font-size: 8px;
  color: var(--text-muted);
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #181b26;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 9999;
  min-width: 130px;
}

.lang-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #e5e7eb;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.lang-option-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}

.lang-option-btn.active {
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-weight: 700;
}

/* Spinner e Loading de Inicialização Suave (Zero Flash de Login) */
@keyframes portalSpin {
  to { transform: rotate(360deg); }
}

.portal-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  gap: 16px;
}

.portal-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: portalSpin 0.8s linear infinite;
}

/* Campos de Checkout Bloqueados e Verificados */
.input-locked-verified {
  background-color: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  font-weight: 600 !important;
  cursor: not-allowed !important;
}

.verified-field-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #10b981;
  font-weight: 700;
  margin-left: 6px;
}

/* Seletor Dinâmico de Moedas Multiglobal */
.currency-pill-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.currency-pill-btn:hover {
  background: rgba(30, 41, 59, 0.85);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.currency-pill-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.35));
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
  font-weight: 700;
}

/* ==============================================================================
   EXTRATO DE CRÉDITOS (CREDIT LEDGER UI)
   ============================================================================== */
.btn-xs-ledger:hover {
  background: rgba(139, 92, 246, 0.25) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
}

.btn-ledger-filter {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ledger-filter:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-ledger-filter.active {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.btn-icon-subtle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #94a3b8;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-subtle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: rotate(180deg);
}

.ledger-summary-box {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-summary-box.box-in {
  border-left: 3px solid #10b981;
}

.ledger-summary-box.box-out {
  border-left: 3px solid #ef4444;
}

.ledger-summary-box.box-balance {
  border-left: 3px solid #8b5cf6;
}

.ledger-sum-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.ledger-sum-val {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.ledger-table th {
  background: rgba(15, 23, 42, 0.35);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ledger-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
}

.ledger-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-ledger-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-ledger-type.credit {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-ledger-type.debit {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.val-credit {
  color: #34d399;
  font-weight: 700;
  font-family: monospace, sans-serif;
  font-size: 13.5px;
}

.val-debit {
  color: #f87171;
  font-weight: 700;
  font-family: monospace, sans-serif;
  font-size: 13.5px;
}

.val-balance {
  color: #cbd5e1;
  font-weight: 600;
  font-family: monospace, sans-serif;
}

/* ==========================================================================
   Modal Onboarding: Instalação da Extensão Chrome Web Store pós-cadastro
   ========================================================================== */
.install-ext-card {
  max-width: 520px;
  width: 90%;
  background: #111827;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  text-align: center;
  color: #f8fafc;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.install-ext-header {
  margin-bottom: 24px;
}

.install-ext-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.05) 70%);
  border: 1.5px solid rgba(16, 185, 129, 0.5);
  border-radius: 50%;
  font-size: 32px;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.install-ext-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.3;
}

.install-ext-subtitle {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.install-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.install-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s, background 0.2s;
}

.install-step-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.05);
}

.install-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.install-step-info h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.install-step-info p {
  margin: 0;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.install-ext-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.btn-install-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-install-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.55);
}

/* ==========================================================================
   Banner de Instalação da Extensão (Dentro do Dashboard Web)
   ========================================================================== */
.portal-ext-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-left: 4px solid #8b5cf6;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ext-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.ext-banner-content {
  flex: 1;
}

.ext-banner-content h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.ext-banner-content p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

.ext-banner-action {
  flex-shrink: 0;
}

.btn-ext-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-ext-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.5);
}

@media (max-width: 640px) {
  .portal-ext-install-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .ext-banner-action {
    width: 100%;
  }
  .btn-ext-install {
    width: 100%;
    justify-content: center;
  }
}
