/* ============================================
   ALEGRY - Front Pages Stylesheet
   Páginas de autenticação, checkout, convites
   Tom claro com identidade visual Alegry
   ============================================ */

:root {
  /* Cores baseadas no sistema Alegry */
  --bg: #f7fafc;
  --bg-alt: #ffffff;
  --text-main: #475569;
  --text-muted: #64748B;
  --text-tertiary: #94A3B8;
  
  /* Cores do sistema Alegry */
  --primary: #00b0ff;
  --secondary: #0EA5E9;
  --accent: #EC4899;
  --success: #10B981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Bordas e sombras */
  --border-soft: rgba(15, 23, 42, 0.1);
  --border-light: rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-btn: 0 12px 26px rgba(0, 176, 255, 0.25);
  --shadow-btn-hover: 0 16px 36px rgba(0, 176, 255, 0.32);
  
  /* Bordas arredondadas */
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* ============================================
   RESET / BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Body para páginas de auth (centrado) */
body:not(.site-page) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
}

/* Body para site público */
body.site-page {
  padding: 0;
}

/* ============================================
   WRAPPER / PAGE
   ============================================ */
.page {
  width: 100%;
  max-width: 560px;
}

/* ============================================
   BRAND / LOGO
   ============================================ */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 12px 30px rgba(0, 176, 255, 0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.logo-text-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   TÍTULOS / HEADLINES
   ============================================ */
h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.1rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  text-align: center;
  max-width: 600px;
  margin: 4px auto 0;
}

h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin: 8px 0 26px;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   CARD
   ============================================ */
.card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 30px;
  border: 1px solid var(--border-soft);
  position: relative;
}

.page .card {
  max-width: 100%;
  padding: 24px 22px;
}

.card.gap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================
   ALERTS / FLASH MESSAGES
   ============================================ */
.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success::before {
  content: "✔";
  font-size: 0.8rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1);
}

input.err,
textarea.err {
  background: #fef2f2;
  border-color: var(--danger);
}

input[readonly] {
  background: #f3f4f6;
  border-style: dashed;
  color: var(--text-muted);
  cursor: not-allowed;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 40px;
  cursor: pointer;
}

.error,
.msgError {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  margin-bottom: 12px;
  min-height: 16px;
  display: none;
}

.msgError {
  margin-top: 4px;
}

/* ============================================
   CHIP / EMAIL DISPLAY (STEP 2 LOGIN)
   ============================================ */
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-main);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.88rem;
  line-height: 1.25;
  max-width: 100%;
  margin-bottom: 14px;
}

.chip i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.chip__label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip__label strong {
  font-weight: 600;
}

.chip__btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, transform 0.1s;
}

.chip__btn i {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
}

.chip__btn:hover,
.chip__btn:focus-visible {
  background: rgba(148, 163, 184, 0.24);
}

.chip__btn:active {
  transform: scale(0.96);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn,
.btnPrimary,
button[type="submit"] {
  width: 100%;
  padding: 13px 14px;
  margin-top: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: var(--shadow-btn);
  font-family: inherit;
}

.btn:hover:not(:disabled),
.btnPrimary:hover:not(:disabled),
button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

.btn:disabled,
.btnPrimary:disabled,
button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.loading .loader,
.btnPrimary.loading .spinner {
  display: inline-block;
}

.loader,
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.btnTxt,
.txt,
.btnText {
  transition: opacity 0.15s;
}

/* ============================================
   BADGES / KPI
   ============================================ */
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 22px;
}

.badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-main);
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.badge strong {
  color: var(--text-main);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progressWrap {
  width: 100%;
  margin: 0 auto 22px;
}

.progressWrap small {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

/* ============================================
   PASSWORD INPUT (EYE ICON)
   ============================================ */
.passWrap {
  position: relative;
}

.eye {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  cursor: pointer;
  transition: stroke 0.2s;
}

.eye:hover {
  stroke: var(--text-main);
}

/* ============================================
   HALF COLUMNS
   ============================================ */
.half {
  display: flex;
  gap: 16px;
}

.half > div {
  flex: 1;
}

/* ============================================
   INTL TEL INPUT
   ============================================ */
.iti {
  width: 100% !important;
}

/* ============================================
   SECURITY INFO
   ============================================ */
.security {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -4px;
  justify-content: center;
}

.security svg {
  stroke: var(--primary);
  width: 15px;
  height: 15px;
}

/* ============================================
   LINKS
   ============================================ */
.linkRow {
  text-align: center;
  margin-top: 16px;
}

.linkRow a {
  color: var(--primary);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s;
}

.linkRow a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.footnote {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 22px;
  line-height: 1.45;
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.footnote .lock {
  stroke: var(--primary);
  width: 14px;
  height: 14px;
}

/* ============================================
   FLASH SCREEN (REDIRECT)
   ============================================ */
.flash {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #e5e7eb;
  z-index: 100;
  animation: fade 0.8s ease-out forwards;
}

.flash::before {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.7);
  border-top-color: var(--primary);
  margin-right: 10px;
  animation: spin 1s linear infinite;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  body {
    padding: 24px 14px 32px;
  }

  .card {
    padding: 26px 20px 24px;
    border-radius: 16px;
  }

  .subtitle {
    margin-bottom: 22px;
  }

  .half {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  body {
    padding: 26px 14px 34px;
  }

  .page .card {
    padding: 22px 18px;
  }
}

/* ============================================
   SITE PUBLIC - HEADER / NAVBAR
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.site-header .brand {
  margin-bottom: 0;
  gap: 8px;
}

.site-header .logo-mark {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

.site-header .logo-text-main {
  font-size: 14px;
}

.site-header .logo-text-sub {
  font-size: 10px;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Seletor de Idioma */
.language-selector {
  position: relative;
  display: inline-block;
}

.language-selector select {
  padding: 8px 32px 8px 12px;
  font-size: 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 0;
  width: auto;
}

.language-selector select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1);
}

.language-selector select:hover {
  border-color: var(--primary);
}

/* Botões do Header */
.btn-header {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-header-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.btn-header-secondary:hover {
  background: rgba(15, 23, 42, 0.03);
  border-color: var(--primary);
}

.btn-header-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-header-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

/* Site Body (com header fixo) */
.site-body {
  padding-top: 70px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Site Home Content */
.site-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.site-home h1 {
  margin-bottom: 16px;
  max-width: 800px;
}

.site-home .subtitle {
  margin-bottom: 32px;
  max-width: 600px;
}

.site-home-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-home-actions .btn {
  min-width: 160px;
  width: auto;
  margin-top: 0;
}

/* ============================================
   CHOOSE PLAN - SELEÇÃO DE PLANOS (MODERNO)
   ============================================ */

/* Controls Container */
.plans-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .plans-controls {
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
  }
}

/* Region Selector */
.region-selector-wrap {
  text-align: center;
}

.region-selector-wrap label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.region-select {
  padding: 12px 40px 12px 16px;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  transition: all 0.2s ease;
  min-width: 180px;
  font-weight: 500;
}

.region-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1);
}

.region-select:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Billing Toggle */
.billing-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-alt);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.billing-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.billing-label.active {
  color: var(--text-main);
}

.billing-label:hover {
  color: var(--text-main);
}

.billing-save {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.billing-toggle {
  position: relative;
  width: 56px;
  height: 32px;
  background: var(--border-soft);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.billing-toggle:hover {
  background: rgba(0, 176, 255, 0.2);
}

.billing-toggle.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3);
}

.billing-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.billing-toggle.active .billing-toggle-slider {
  transform: translateX(24px);
  box-shadow: 0 2px 8px rgba(0, 176, 255, 0.4);
}

/* Grid de Planos - Desktop lado a lado, Mobile empilhado */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* Card de Plano */
.plan-card {
  position: relative;
  background: var(--bg-alt);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(0, 176, 255, 0.15);
  transform: translateY(-6px);
}

/* Plano Popular */
.plan-popular {
  border-color: var(--primary);
  border-width: 2.5px;
  box-shadow: 0 8px 24px rgba(0, 176, 255, 0.2);
  transform: scale(1.02);
}

@media (max-width: 1023px) {
  .plan-popular {
    transform: scale(1);
  }
}

.plan-popular:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 176, 255, 0.25);
}

/* Badge Popular */
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 176, 255, 0.4);
  white-space: nowrap;
}

/* Plan Header */
.plan-header {
  margin-bottom: 24px;
}

.plan-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.plan-savings {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 8px;
}

/* Pricing */
.plan-pricing {
  margin-bottom: 32px;
  flex-grow: 1;
}

.plan-price-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.plan-currency {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: flex-start;
  margin-top: 0.2em;
}

.plan-amount {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-period {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
  align-self: flex-end;
  margin-bottom: 0.1em;
}

.plan-price-hint {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 8px;
  line-height: 1.4;
}

/* Actions */
.plan-actions {
  margin-top: auto;
  padding-top: 24px;
}

.plan-actions .btn {
  width: 100%;
  margin-top: 0;
  font-weight: 600;
  padding: 14px 24px;
  font-size: 1rem;
}

.plan-popular .plan-actions .btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 176, 255, 0.3);
}

.plan-popular .plan-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 176, 255, 0.4);
}

/* Empty State */
.plans-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 24px;
}

.back-link a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link a:hover {
  color: var(--primary);
}

/* ============================================
   CONSENT CHECKBOXES
   ============================================ */
.consent-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
  position: relative;
  padding-left: 0;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-soft);
  border-radius: 5px;
  background: var(--bg-alt);
  position: relative;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.checkbox-label:hover .checkbox-custom {
  border-color: var(--primary);
  background: rgba(0, 176, 255, 0.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 176, 255, 0.25);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
}

.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.15);
}

.checkbox-text {
  flex: 1;
  user-select: none;
}

.checkbox-text .link-terms {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.checkbox-text .link-terms:hover {
  border-bottom-color: var(--primary);
  opacity: 0.9;
}

.checkbox-label input[type="checkbox"]:required + .checkbox-custom {
  border-color: var(--text-muted);
}

.checkbox-label input[type="checkbox"]:required:not(:checked) + .checkbox-custom {
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ============================================
   CHECKOUT - PAGAMENTO
   ============================================ */

/* Instant Activation Badge */
.instant-badge {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

/* Checkout Card */
.checkout-card {
  max-width: 640px;
  padding: 32px 28px 28px;
}

/* Plan Summary */
.plan-summary {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #2563eb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.plan-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.plan-summary-label {
  font-size: 0.85rem;
  color: #0284c7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.plan-summary-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0c4a6e;
  line-height: 1.2;
}

.plan-summary-price {
  text-align: right;
}

.plan-summary-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #2563eb;
  line-height: 1;
}

.plan-summary-period {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 4px;
}

.plan-summary-benefits {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid #cbd5e1;
}

.plan-benefit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #059669;
  font-weight: 500;
}

.plan-benefit svg {
  flex-shrink: 0;
  stroke: #059669;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab {
  flex: 1 1 220px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(148, 163, 184, 0.8);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tab svg {
  width: 18px;
  height: 18px;
  stroke: #2563eb;
  flex-shrink: 0;
}

.tab:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}

.tab.active svg {
  stroke: #ffffff;
}

.tab-badge {
  background: #22c55e;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  margin-left: 6px;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 540px) {
  .tabs {
    flex-direction: column;
  }
  .tab {
    flex: 0 0 auto;
  }
}

/* Forms */
.checkout-card form {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.checkout-card form.active {
  display: flex;
}

.form-field {
  position: relative;
}

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

.form-row .form-field {
  flex: 1;
}

.input-wrapper {
  position: relative;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.card-brand {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 6px;
  border-radius: 4px;
}

.expiry-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.expiry-wrapper input {
  flex: 1;
}

.expiry-separator {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.1rem;
}

.notice {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  padding: 12px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-md);
}

.security-badge {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -4px;
}

.security-badge svg {
  width: 20px;
  height: 20px;
  stroke: #22c55e;
  flex-shrink: 0;
}

.security-badge span {
  font-size: 0.85rem;
  color: #166534;
  font-weight: 500;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.trust-badge-item {
  text-align: center;
  flex: 0 0 auto;
}

.trust-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
  line-height: 1;
}

.trust-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.trust svg {
  width: 14px;
  height: 14px;
  stroke: #22c55e;
  flex-shrink: 0;
}

/* Validation States */
input:valid:not(:placeholder-shown) {
  border-color: #cbd5e1;
}

input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  background: #fef2f2;
}

input:focus:valid {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1);
}

input:focus:invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Responsive Checkout */
@media (max-width: 640px) {
  .checkout-card {
    padding: 24px 18px 20px;
  }
  
  .plan-summary-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .plan-summary-price {
    text-align: left;
    width: 100%;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .trust-badges {
    gap: 16px;
  }
}

/* ============================================
   PIX PAYMENT PAGE
   ============================================ */

/* Top Warning Banner */
.pix-banner {
  width: 100%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-weight: 600;
  font-size: 0.9rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

body.has-pix-banner {
  padding-top: 52px;
}

/* PIX Card */
.pix-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  width: 100%;
  max-width: 600px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* PIX Success Header */
.pix-success-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  padding: 18px 16px;
  border-radius: var(--radius-md);
  border: 2px solid #86efac;
}

.pix-success-header svg {
  width: 24px;
  height: 24px;
  stroke: #22c55e;
  flex-shrink: 0;
  margin-top: 2px;
}

.pix-success-header-content {
  flex: 1;
}

.pix-success-header .title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 6px;
}

.pix-success-header .message {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 8px;
}

.pix-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #16a34a;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}

.pix-countdown.expiring {
  color: #ef4444;
  background: #fef2f2;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* QR Code Section */
.pix-qr-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
}

.pix-qr-code-wrapper {
  position: relative;
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border: 3px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pix-qr-code-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: #22c55e;
}

.pix-qr-section img {
  max-width: 280px;
  width: 100%;
  display: block;
  border-radius: 12px;
  background: #f9fafb;
}

/* PIX Payload */
.pix-payload {
  width: 100%;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pix-payload:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.pix-payload-code {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-main);
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-weight: 500;
  text-align: left;
  min-width: 0;
}

.pix-copy-button {
  background: #ffffff;
  border: 2px solid #22c55e;
  color: #22c55e;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.pix-copy-button:hover {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

.pix-copy-button.copied {
  background: #22c55e;
  color: #fff;
  border-color: #16a34a;
}

/* PIX Info Section */
.pix-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
}

.pix-info-message {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #92400e;
}

.pix-user-data {
  margin-top: 16px;
  background: #f9fafb;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #e5e7eb;
}

.pix-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.pix-user-row svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  flex-shrink: 0;
}

/* PIX Toast Notification */
.pix-toast {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(120%);
  min-width: 300px;
  max-width: 90%;
  padding: 16px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pix-toast svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  flex-shrink: 0;
}

.pix-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* PIX Trust Footer */
.pix-trust {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.5;
}

.pix-trust svg {
  stroke: #22c55e;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* PIX Loading State */
.pix-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pix-loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* PIX Error State */
.pix-error {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: #dc2626;
}

.pix-error-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.pix-error-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pix-error-message {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Responsive PIX */
@media (max-width: 640px) {
  .pix-card {
    padding: 24px 20px 22px;
  }
  
  .pix-qr-section img {
    max-width: 240px;
  }
  
  .pix-payload {
    flex-direction: column;
    align-items: stretch;
  }
  
  .pix-copy-button {
    width: 100%;
  }
  
  .pix-payload-code {
    text-align: center;
  }
  
  .pix-countdown {
    font-size: 0.9rem;
    padding: 5px 10px;
  }
}

/* ============================================
   PAYMENT INVOICE PAGE (PIX + CARD)
   ============================================ */

/* Invoice Banner */
.invoice-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: slideDown 0.3s ease-out;
}

body.has-invoice-banner {
  padding-top: 52px;
}

/* Invoice Card */
.invoice-card {
  width: 100%;
  max-width: 640px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 40px 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  border: 1px solid var(--border-soft);
}

@media (max-width: 640px) {
  .invoice-card {
    padding: 32px 24px 40px;
  }
}

/* Payment Method Pill */
.payment-pill {
  margin: 0 auto 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.08));
  color: #22c55e;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid rgba(34, 197, 94, 0.2);
  letter-spacing: 0.02em;
}

/* Invoice QR Zone */
.invoice-qr-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.invoice-qr-zone img {
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background: #f9fafb;
  padding: 12px;
  border: 3px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.invoice-qr-zone img:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: #22c55e;
}

.invoice-payload {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  width: 100%;
  word-break: break-all;
  font-size: 0.9rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.invoice-payload:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.invoice-payload-code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-weight: 500;
  color: var(--text-main);
  min-width: 0;
}

.invoice-copy-btn {
  border: 2px solid #22c55e;
  background: #ffffff;
  color: #22c55e;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.invoice-copy-btn:hover {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

.invoice-copy-btn.copied {
  background: #22c55e;
  color: #fff;
  border-color: #16a34a;
}

.invoice-swap {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-md);
}

.invoice-swap-button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
  padding: 0;
  font-size: inherit;
}

.invoice-swap-button:hover {
  color: var(--secondary);
}

/* Invoice Card Form */
.invoice-form-group {
  position: relative;
  margin-bottom: 24px;
}

.invoice-form-input {
  width: 100%;
  padding: 20px 16px 8px;
  font-size: 0.95rem;
  border: 2px solid #d1d5db;
  border-radius: var(--radius-md);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
}

.invoice-form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1);
}

.invoice-form-input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  background: #fef2f2;
}

.invoice-form-label {
  position: absolute;
  left: 16px;
  top: 20px;
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.invoice-form-input:not(:placeholder-shown) + .invoice-form-label,
.invoice-form-input:focus + .invoice-form-label {
  top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.invoice-form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 480px) {
  .invoice-form-row-3 {
    grid-template-columns: 1fr;
  }
  
  .invoice-payload {
    flex-direction: column;
    align-items: stretch;
  }
  
  .invoice-copy-btn {
    width: 100%;
  }
  
  .invoice-payload-code {
    text-align: center;
  }
}

.invoice-submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
  font-family: inherit;
  margin-top: 8px;
}

.invoice-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.4);
}

.invoice-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.invoice-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.invoice-submit-btn.loading .invoice-spinner {
  display: inline-block;
}

/* Invoice Toast */
.invoice-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 120%);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9999;
}

.invoice-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.invoice-toast svg {
  stroke: #fff;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ============================================
   SUCCESS PAGE - PÁGINA DE SUCESSO
   ============================================ */

/* Success Card */
.success-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  width: 100%;
  max-width: 600px;
  padding: 48px 40px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.success-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
}

/* Success Icon */
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-icon svg {
  width: 48px;
  height: 48px;
  stroke: #22c55e;
  stroke-width: 3;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Success Content */
.success-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.success-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.success-content p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 480px;
}

/* Success Features */
.success-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: var(--radius-md);
  border: 1px solid #bae6fd;
}

.success-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
  text-align: left;
}

.success-feature svg {
  flex-shrink: 0;
  stroke: #059669;
  width: 20px;
  height: 20px;
}

/* Success Footer */
.success-footer {
  margin-top: 32px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.success-footer .security {
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Success Confetti Animation */
.success-confetti {
  position: fixed;
  top: -12px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 9999;
  animation: confettiFall 2s forwards linear;
}

@keyframes confettiFall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Responsive Success Page */
@media (max-width: 640px) {
  .success-card {
    padding: 36px 24px;
    gap: 24px;
  }

  .success-icon {
    width: 64px;
    height: 64px;
  }

  .success-icon svg {
    width: 36px;
    height: 36px;
  }

  .success-content h2 {
    font-size: 1.5rem;
  }

  .success-content p {
    font-size: 0.9rem;
  }

  .success-features {
    padding: 20px;
    gap: 12px;
  }

  .success-feature {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .success-card {
    padding: 28px 20px;
  }

  .success-content h2 {
    font-size: 1.3rem;
  }
}

/* ============================================
   FORGOT PASSWORD PAGE - RECUPERAÇÃO DE SENHA
   ============================================ */

/* Forgot Password Card */
.forgot-password-card {
  max-width: 440px;
  padding: 40px 36px;
  animation: rise 0.45s ease-out;
}

@keyframes rise {
  0% {
    transform: translateY(16px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* Forgot Password Steps */
.forgot-password-card > div[id^="step"] {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Error Messages */
.forgot-password-card .error {
  color: var(--danger);
  font-size: 0.78rem;
  min-height: 18px;
  margin: -8px 0 8px;
  line-height: 1.4;
}

/* Field Hint */
.forgot-password-card .field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0;
}

/* Code Input Special Styling */
#fpCode {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  font-family: 'Courier New', monospace;
}

/* Link Row */
.forgot-password-card .linkRow {
  margin-top: 24px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.forgot-password-card .linkRow a {
  color: var(--primary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.forgot-password-card .linkRow a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Responsive Forgot Password */
@media (max-width: 480px) {
  .forgot-password-card {
    padding: 32px 24px;
  }

  #fpCode {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
  }
}

