:root{
  --bg:#f6f8ff;
  --text:#0b1020;
  --muted:#5c6478;
  --brand:#3d05b1;
  --brand-2:#5b1ee5;
  --brand-soft:rgba(61,5,177,.08);
  --border:rgba(11,16,32,.10);
  --white:#fff;
  --success:#0f9f6e;
  --danger:#c43d3d;
  --shadow:0 22px 50px rgba(11,16,32,.10);
  --radius:24px;
}

*{box-sizing:border-box}

html,body,input,button,select,textarea{
  font-family:"Oxanium",system-ui,sans-serif
}

body{
  margin:0;
  background:linear-gradient(180deg,#ffffff 0%,#f6f8ff 100%);
  color:var(--text)
}

img{display:block;max-width:100%}
button,input,select,textarea{font:inherit}

.container{
  width:min(1120px,100%);
  margin:0 auto;
  padding:16px
}

.topbar{
  position:sticky;
  top:0;
  z-index:30;
  background:#fff;
  border-bottom:1px solid var(--border);
  box-shadow:0 8px 24px rgba(11,16,32,.05)
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:74px
}

.brand{
  height:48px;
  width:auto;
  filter:brightness(0) saturate(100%) invert(13%) sepia(96%) saturate(6100%) hue-rotate(256deg) brightness(55%) contrast(110%)
}

.topbar__badge{
  padding:10px 14px;
  border-radius:999px;
  background:var(--brand-soft);
  color:var(--brand);
  font-weight:700;
  font-size:14px
}

.page{padding:28px 0 44px}
.shell{display:grid;gap:20px}

.hero-card,.panel{
  border:1px solid var(--border);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-radius:var(--radius);
  box-shadow:var(--shadow)
}

.hero-card{
  padding:24px;
  background:linear-gradient(135deg,#2f048d 0%,#4a14cf 55%,#7a57ff 100%);
  color:#fff
}

.hero-card__eyebrow{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:13px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase
}

.hero-card__title{
  margin:18px 0 10px;
  font-size:28px;
  line-height:1.1
}

.hero-card__text{margin:0;color:rgba(255,255,255,.82)}

.steps-mobile{display:grid;gap:10px;margin-top:22px}

.steps-mobile__eyebrow{
  font-size:12px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:rgba(255,255,255,.76)
}

.steps-mobile__card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border-radius:20px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18)
}

.steps-mobile__number{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:50%;
  background:#fff;
  color:var(--brand);
  font-size:20px;
  font-weight:800;
  flex:none
}

.steps-mobile__title{
  display:block;
  font-size:18px;
  line-height:1.1
}

.steps-mobile__progress{
  margin:4px 0 0;
  color:rgba(255,255,255,.76);
  font-size:13px
}

.steps{
  list-style:none;
  padding:0;
  margin:22px 0 0;
  display:none;
  gap:12px
}

.steps__item{
  display:flex;
  align-items:center;
  gap:12px;
  color:rgba(255,255,255,.58);
  font-weight:600
}

.steps__item span:first-child{
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  flex:none
}

.steps__label{display:inline-block}
.steps__item.is-done{color:rgba(255,255,255,.88)}

.steps__item.is-done span:first-child{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.3)
}

.steps__item.is-current{color:#fff}

.steps__item.is-current span:first-child{
  background:#fff;
  color:var(--brand);
  border-color:#fff
}

.panel{padding:22px}
.panel__header{margin-bottom:18px}

.panel__kicker{
  margin:0 0 6px;
  color:var(--brand);
  font-weight:800;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:.03em
}

.panel__title{
  margin:0;
  font-size:28px;
  line-height:1.1
}

.panel__text{
  margin:8px 0 0;
  color:var(--muted)
}

.view{display:none}
.view.is-active{display:block}
.stack-lg{display:grid;gap:18px}

.field{display:grid;gap:8px}

.field__label{
  font-size:14px;
  font-weight:700;
  color:#242d45
}

.field__input{
  width:100%;
  border:1px solid rgba(61,5,177,.16);
  background:#fff;
  border-radius:18px;
  padding:14px 16px;
  color:var(--text);
  outline:none;
  transition:border-color .2s, box-shadow .2s
}

.field__input:focus{
  border-color:rgba(61,5,177,.55);
  box-shadow:0 0 0 4px rgba(61,5,177,.12)
}

.field__textarea{resize:none;min-height:120px}

.actions-grid{
  display:grid;
  gap:12px;
  margin-top:20px
}

.actions-grid--bottom{margin-top:22px}

.btn{
  appearance:none;
  border:0;
  border-radius:18px;
  padding:14px 18px;
  font-weight:800;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease
}

.btn:hover{transform:translateY(-1px)}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}

.btn--primary{
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-2) 100%);
  color:#fff;
  box-shadow:0 16px 30px rgba(61,5,177,.22)
}

.btn--ghost{
  background:#fff;
  border:1px solid rgba(61,5,177,.18);
  color:var(--brand)
}

.btn--text{
  background:transparent;
  color:var(--muted);
  padding:10px 0
}

.alert{
  padding:14px 16px;
  border-radius:18px;
  font-weight:700;
  margin-bottom:16px
}

.alert--error{
  background:rgba(196,61,61,.10);
  color:var(--danger);
  border:1px solid rgba(196,61,61,.18)
}

.alert--success{
  background:rgba(15,159,110,.10);
  color:var(--success);
  border:1px solid rgba(15,159,110,.16)
}

.company-card,
.summary-card{
  display:grid;
  gap:14px;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg,#fff 0%,#f9f7ff 100%);
  border:1px solid rgba(61,5,177,.12)
}

.company-card__label{
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
  margin-bottom:6px
}

.company-card__value{font-size:18px}

.summary-card{
  margin-top:14px;
}

.summary-card__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px dashed rgba(11,16,32,.10)
}

.summary-card__row:last-child{
  border-bottom:0;
  padding-bottom:0
}

.grid-2{display:grid;gap:14px}

.pix-card{display:grid;gap:18px}

.pix-card__label{
  margin:0;
  color:var(--muted);
  font-weight:700
}

.pix-card__countdown{
  margin:0;
  font-size:42px;
  color:var(--brand);
  line-height:1
}

.qr-box{
  display:grid;
  place-items:center;
  min-height:260px;
  border:1px dashed rgba(61,5,177,.25);
  border-radius:24px;
  padding:16px;
  background:linear-gradient(180deg,#fff,#f7f4ff);
  overflow:hidden
}

.qr-box img{
  width:min(100%,280px);
  height:auto;
  border-radius:14px;
  box-shadow:0 12px 28px rgba(11,16,32,.12)
}

.qr-box__figure{
  display:grid;
  justify-items:center;
  gap:12px;
  width:100%
}

.qr-box__image{
  width:min(100%,280px);
  height:auto;
  border-radius:14px;
  box-shadow:0 12px 28px rgba(11,16,32,.12);
  background:#fff;
  padding:10px
}

.qr-box__caption{
  margin:0;
  color:var(--muted);
  font-size:14px;
  text-align:center
}

.pix-code-wrap{display:grid;gap:12px}

.result{
  text-align:center;
  display:grid;
  gap:18px
}

.result__icon{
  width:72px;
  height:72px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:34px;
  font-weight:800;
  margin:0 auto
}

.result--success .result__icon{
  background:rgba(15,159,110,.12);
  color:var(--success)
}

.result--error .result__icon{
  background:rgba(196,61,61,.12);
  color:var(--danger)
}

@media (min-width:900px){
  .shell{grid-template-columns:380px 1fr}
  .panel{padding:28px}
  .grid-2{grid-template-columns:1fr 1fr}
  .actions-grid{grid-template-columns:1fr 1fr}
  .steps-mobile{display:none}
  .steps{display:grid}
}

/* Mobile fix: evitar rolagem horizontal na etapa de confirmação */
html, body {
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .page,
  .layout,
  .wrapper,
  .container,
  .content,
  .panel,
  .card,
  .step-panel,
  .success-card,
  .status-card,
  .payment-status,
  .payment-result,
  .summary-card,
  .confirm-card,
  .confirmation-card,
  .box,
  .hero {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .grid,
  .row,
  .columns,
  .actions,
  .status-grid,
  .success-grid,
  .payment-grid,
  .summary-grid {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }

  .card,
  .step-panel,
  .success-card,
  .status-card,
  .payment-status,
  .payment-result,
  .summary-card,
  .confirm-card,
  .confirmation-card {
    overflow-x: hidden;
  }

  .card *,
  .step-panel *,
  .success-card *,
  .status-card *,
  .payment-status *,
  .payment-result *,
  .summary-card *,
  .confirm-card *,
  .confirmation-card * {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  table {
    width: 100%;
    table-layout: fixed;
    display: block;
    overflow-x: auto;
  }

  pre,
  code,
  .mono,
  .pix-code,
  .copy-code,
  .payment-code,
  .license-code,
  .status-code {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .actions .btn,
  .button-row .btn,
  .btn,
  button {
    width: 100%;
    max-width: 100%;
  }

  .summary-card{
    margin-top:18px;
  }
}

.panel__warning{
  margin:10px 0 0;
  padding:10px 14px;
  border-radius:14px;
  background:rgba(196,61,61,.08);
  border:1px solid rgba(196,61,61,.18);
  color:var(--danger);
  font-size:13px;
  line-height:1.35;
  font-weight:700;
  animation:warningBlink 1.15s ease-in-out infinite;
}

@keyframes warningBlink{
  0%,100%{opacity:1;transform:translateY(0)}
  50%{opacity:.35;transform:translateY(-1px)}
}

@media (min-width: 769px){
  .panel__warning{
    font-size:12px;
    max-width:760px;
  }
}

.card-payment-card{
  display:grid;
  gap:16px;
}

.summary-card--compact{
  margin-top:0;
}

.mp-card-container{
  width:100%;
  max-width:760px;
  margin:0 auto;
  border:1px solid rgba(61,5,177,.12);
  border-radius:22px;
  background:#fff;
  padding:14px;
  overflow:hidden;
}

@media (max-width: 768px){
  .mp-card-container{
    max-width:100%;
    padding:10px;
    border-radius:18px;
  }
}

/* Ajuste de botões da etapa de pagamento */
.plan-toolbar{
  display:flex;
  justify-content:flex-start;
  margin:0 0 14px;
}

.btn--back-inline{
  width:auto;
  padding:8px 0;
  background:transparent;
  color:var(--brand);
  box-shadow:none;
  border-radius:0;
}

.payment-choice-grid{
  grid-template-columns:1fr;
}

.btn--payment{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:56px;
}

.btn__icon{
  width:26px;
  height:26px;
  object-fit:contain;
  flex:0 0 auto;
}

@media (min-width:900px){
  .payment-choice-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:768px){
  .plan-toolbar{margin-bottom:12px;}
  .btn--back-inline{width:auto;}
  .btn--payment{min-height:54px;}
}

/* ===== Portal multiempresa: tema neutro/branco ===== */
body{
  background:#f6f7fb;
}
.topbar{
  background:#fff;
}

.topbar__inner{
  min-height:96px;
}
.brand{
  max-height:76px;
  height:auto;
  max-width:320px;
  object-fit:contain;
  filter:none!important;
}
.hero-card{
  background:#fff;
  color:var(--text);
}
.hero-card__eyebrow,
.steps-mobile__eyebrow{
  color:#5c6478;
  background:#f5f7fb;
}
.hero-card__text,
.steps-mobile__progress{
  color:#5c6478;
}
.steps-mobile__card{
  background:#f8fafc;
  border-color:rgba(11,16,32,.08);
}
.steps-mobile__number,
.steps__item.is-current span:first-child{
  background:#111827;
  color:#fff;
}
.steps__item,
.steps__item.is-done,
.steps__item.is-current{
  color:#111827;
}
.steps__item span:first-child{
  background:#f8fafc;
  border-color:rgba(11,16,32,.12);
  color:#111827;
}
.panel__kicker,
.topbar__badge{
  color:#111827;
  background:#f3f4f6;
}
.btn--primary{
  background:#111827!important;
  color:#fff!important;
}
.btn--ghost{
  color:#111827!important;
  border-color:rgba(17,24,39,.18)!important;
}
.field__input:focus{
  border-color:rgba(17,24,39,.45);
  box-shadow:0 0 0 4px rgba(17,24,39,.08);
}
.result--success .result__icon{
  background:#111827!important;
}


@media (max-width:520px){
  .brand{
    max-height:64px;
    max-width:250px;
  }
  .topbar__inner{
    min-height:84px;
  }
}
