/* ============================================================
   app.css — Layout shell, wizard, steps, pipeline
   ============================================================ */

.app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; position: relative; z-index: 1; }

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px 18px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent 40%), var(--surface);
}
.side-brand { padding: 4px 8px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-md);
  color: var(--text-2); font-weight: 500; font-size: 14.5px;
  transition: all .15s ease; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--blue-ghost); color: #fff; }
.nav-item.on::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 9px; background: var(--brand-yellow); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--text-2); padding: 2px 8px; border-radius: 99px; }
.nav-item.on .nav-badge { background: rgba(255,255,255,.12); color: #fff; }

.side-cta {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px; border-radius: var(--r-md); font-family: var(--font-display); font-weight: 600; font-size: 14px;
  background: var(--brand-yellow); color: #000; transition: transform .15s ease, filter .15s ease;
}
.side-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }

.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.side-foot-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--success); box-shadow: 0 0 0 4px var(--success-ghost); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { display: none; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.hamburger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.main-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }

.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); transition: all .15s ease; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-blue-300); font-size: 13px; font-weight: 600; padding: 4px 0; width: fit-content; }
.link-btn:hover { color: var(--brand-blue-400); }

/* Buttons hover */
.ddbtn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ddbtn[data-variant="ghost"]:hover, .ddbtn[data-variant="outline"]:hover { background: var(--hover); transform: none; }
.ddbtn[data-variant="subtle"]:hover { background: var(--surface-2); transform: none; }
.ddbtn:active { transform: translateY(0); }
.ddbtn:disabled { cursor: default; }

/* Field focus */
.ddfield:focus-within { border-color: var(--brand-blue-400); box-shadow: var(--ring); background: var(--elevated); }
.ddfield[data-error="true"] { border-color: var(--danger); }

/* ============================================================
   WIZARD
   ============================================================ */
.wizard { display: flex; flex-direction: column; height: 100%; }

.stepper-wrap { padding: 22px 36px 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), transparent); overflow-x: auto; scrollbar-width: none; }
.stepper-wrap::-webkit-scrollbar { display: none; }
.stepper { display: flex; align-items: center; max-width: var(--maxw); min-width: max-content; margin: 0 auto 18px; }
.step-node { display: flex; align-items: center; gap: 9px; }
.step-dot {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); transition: all .2s ease; flex-shrink: 0;
}
.step-label { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; transition: color .2s ease; }
.step-node[data-active="true"] .step-dot { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); box-shadow: 0 0 0 4px var(--blue-ghost); }
.step-node[data-active="true"] .step-label { color: var(--text); }
.step-node[data-done="true"] .step-dot { background: var(--success-ghost); color: var(--success); border-color: transparent; }
.step-node[data-done="true"] .step-label { color: var(--text-2); }
.step-line { flex: 1; height: 2px; background: var(--line); margin: 0 12px; border-radius: 9px; min-width: 14px; transition: background .3s ease; }
.step-line[data-done="true"] { background: linear-gradient(90deg, var(--success), var(--brand-blue)); }

.wiz-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.step-pane { max-width: var(--maxw); margin: 0 auto; padding: 38px 36px 40px; }
.step-pane.narrow { max-width: 860px; }

.step-head { margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.step-head h1 { font-size: 30px; }
.step-head p { color: var(--text-3); font-size: 15px; max-width: 560px; }

.wiz-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 36px; border-top: 1px solid var(--line); background: var(--surface);
}

/* ----- Form ----- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; max-width: 820px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ============================================================
   ETAPA 2 — Serviços
   ============================================================ */
.svc-pane { display: grid; grid-template-columns: 1fr 348px; gap: 30px; align-items: start; max-width: var(--maxw); }
.svc-main { min-width: 0; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cat-tab { padding: 8px 15px; border-radius: 99px; font-size: 13px; font-weight: 600; font-family: var(--font-display); color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line); transition: all .15s ease; }
.cat-tab:hover { color: var(--text); }
.cat-tab.on { background: #fff; color: #000; border-color: #fff; }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.svc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.svc-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.svc-card.is-sel { border-color: var(--brand-blue-400); box-shadow: 0 0 0 1px var(--brand-blue-400), var(--shadow-md); }
.svc-top { display: flex; gap: 13px; padding: 18px; cursor: pointer; }
.svc-check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-3); flex-shrink: 0; transition: all .2s ease; }
.svc-card.is-sel .svc-check { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.svc-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-blue-300); }
.svc-rec { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-yellow); background: var(--yellow-ghost); padding: 1px 7px; border-radius: 99px; }
.svc-name { font-size: 16px; margin-bottom: 5px; }
.svc-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.svc-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 16px; margin-top: auto; }
.svc-price { font-size: 17px; font-weight: 700; }
.svc-add { font-size: 13px; font-weight: 600; font-family: var(--font-display); color: var(--text); background: var(--surface-2); border: 1px solid var(--line); padding: 7px 14px; border-radius: 9px; transition: all .15s ease; }
.svc-add:hover { background: var(--hover); }
.svc-edit { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-blue-300); }
.svc-editor { padding: 0 18px 18px; border-top: 1px solid var(--line); margin-top: 2px; }
.svc-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; margin-bottom: 12px; }

/* ----- Cart ----- */
.cart { position: sticky; top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 220px); }
.cart-client { background: var(--surface-2); border-radius: var(--r-md); padding: 11px 13px; display: flex; flex-direction: column; gap: 2px; }
.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 80px; margin: 0 -4px; padding: 0 4px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 30px 10px; color: var(--text-3); font-size: 13px; }
.cart-item { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: var(--r-md); padding: 11px 13px; }
.cart-x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--text-3); transition: all .15s ease; }
.cart-x:hover { background: rgba(240,85,107,.15); color: var(--danger); }
.cart-foot { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ============================================================
   ETAPA 3 — Resumo
   ============================================================ */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel-h { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.panel-h svg { color: var(--brand-blue-300); }
.sum-items { display: flex; flex-direction: column; gap: 2px; }
.sum-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sum-obs { font-size: 12px; color: var(--text-3); font-style: italic; margin-top: 3px; }
.sum-total { margin-top: 14px; padding-top: 16px; border-top: 1.5px solid var(--line-strong); }
.pay-opts { display: flex; flex-direction: column; gap: 8px; }
.pay-opt { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; text-align: left; transition: all .15s ease; }
.pay-opt:hover { border-color: var(--line-strong); color: var(--text); }
.pay-opt.on { border-color: var(--brand-blue-400); background: var(--blue-ghost); color: #fff; }
.pay-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text-dim); flex-shrink: 0; transition: all .15s ease; }
.pay-opt.on .pay-radio { border-color: var(--brand-yellow); background: radial-gradient(circle, var(--brand-yellow) 0 38%, transparent 42%); }
.obs-area, .sign-canvas { width: 100%; }
.obs-area { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px; font-size: 14px; resize: vertical; outline: none; transition: all .15s ease; }
.obs-area:focus { border-color: var(--brand-blue-400); box-shadow: var(--ring); }

/* ============================================================
   ETAPA 4 — Termo de aceite
   ============================================================ */
.term { background: #fff; color: #15171c; border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow-lg); }
.term .mark i:first-child { background: var(--brand-yellow); } .term .mark i:last-child { background: var(--brand-blue); }
.term-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; border-bottom: 2px solid #ececf0; margin-bottom: 20px; }
.term-head .col span:first-child { color: #1a1c22; }
.term-head .col span:last-child { color: #8a8f9c; }
.term-head .eyebrow { color: #6b7180; }
.term-block { margin-bottom: 20px; }
.term-label { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-blue); display: block; margin-bottom: 7px; }
.term-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; font-size: 14px; }
.term-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.term-table th { text-align: left; font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a8f9c; padding: 6px 0; border-bottom: 1px solid #e6e7ec; }
.term-table td { padding: 9px 0; border-bottom: 1px solid #f0f1f4; vertical-align: top; }
.term-obs { color: #8a8f9c; font-style: italic; }
.term-table tfoot td { border: none; padding-top: 12px; font-weight: 600; color: #4a505c; }
.term-total td { font-size: 17px; font-weight: 800 !important; color: #15171c !important; font-family: var(--font-display); }
.term-cond { display: flex; gap: 40px; flex-wrap: wrap; }
.term-cond > div > div { font-size: 14px; margin-top: 2px; }
.term-legal { background: #f6f7f9; border-left: 3px solid var(--brand-yellow); border-radius: 8px; padding: 15px 18px; font-size: 13.5px; line-height: 1.6; color: #3a3f4a; }

.accept-box { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.accept-check { display: flex; align-items: center; gap: 13px; cursor: pointer; font-size: 15px; }
.accept-check input { position: absolute; opacity: 0; pointer-events: none; }
.accept-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--surface-2); color: transparent; flex-shrink: 0; transition: all .15s ease; }
.accept-check input:checked + .accept-mark { background: var(--brand-yellow); border-color: var(--brand-yellow); color: #000; }
.accept-check input:focus-visible + .accept-mark { box-shadow: var(--ring); }

.sign-wrap { position: relative; height: 150px; background: #fff; border-radius: var(--r-md); overflow: hidden; }
.sign-canvas { width: 100%; height: 100%; touch-action: none; cursor: crosshair; display: block; }
.sign-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #aeb4c0; font-size: 13.5px; pointer-events: none; }
.sign-clear { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #6b7180; background: #f2f3f5; padding: 5px 10px; border-radius: 8px; }
.sign-clear:hover { background: #e8e9ec; }

/* ============================================================
   ETAPA 5 — Compartilhar
   ============================================================ */
.seal { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--success-ghost); color: var(--success); margin-bottom: 4px; animation: popIn .4s cubic-bezier(.22,1,.36,1) both; }
.share-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.share-actions { display: flex; flex-direction: column; gap: 12px; }
.share-btn { display: flex; align-items: center; gap: 13px; padding: 17px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 15px; transition: all .15s ease; }
.share-btn:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.share-btn.wpp { color: #25D366; }
.share-btn.wpp:hover { border-color: rgba(37,211,102,.4); }
.share-btn.primary-share { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; box-shadow: 0 6px 18px rgba(0,74,173,.35); }
.share-btn.primary-share:hover { filter: brightness(1.06); border-color: var(--brand-blue); background: var(--brand-blue); }
.sig-attach { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.sig-attach-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sig-dl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand-blue-300); }
.sig-dl:hover { color: var(--brand-blue-400); }
.sig-thumb { width: 100%; max-height: 130px; object-fit: contain; background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); }
.share-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.share-text { font-family: var(--font-body); font-size: 13.5px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.muted-note { display: flex; align-items: center; gap: 7px; margin-top: 20px; font-size: 12.5px; color: var(--text-3); }

/* ============================================================
   ETAPA 6 — Pagamento
   ============================================================ */
.pay-card { display: grid; grid-template-columns: auto 1fr; gap: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; align-items: start; }
.pay-qr { display: grid; place-items: center; }
.pay-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pay-amount { display: flex; flex-direction: column; gap: 2px; }
.pay-meta { display: flex; flex-direction: column; gap: 9px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); }
.pay-meta b { color: var(--text); font-weight: 600; }
.pix-cc { display: flex; flex-direction: column; gap: 9px; }
.pix-code { font-family: 'Sora', monospace; font-size: 11.5px; color: var(--text-2); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; word-break: break-all; line-height: 1.5; max-height: 92px; overflow-y: auto; }

/* ============================================================
   PIPELINE
   ============================================================ */
.pipeline { display: flex; flex-direction: column; height: 100%; }
.pipe-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 30px 36px 22px; flex-wrap: wrap; }
.pipe-search { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 13px; }
.pipe-search input { background: none; border: none; outline: none; padding: 11px 0; font-size: 14px; width: 170px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 16px; overflow-x: auto; padding: 4px 36px 32px; flex: 1; align-items: start; min-height: 0; }
.column { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: 100%; transition: border-color .15s ease, background .15s ease; }
.column.over { border-color: var(--brand-blue-400); background: var(--blue-ghost); }
.col-head { display: flex; align-items: center; gap: 9px; padding: 16px 16px 4px; }
.col-dot { width: 9px; height: 9px; border-radius: 99px; background: oklch(0.68 0.16 var(--hue)); flex-shrink: 0; }
.col-name { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; }
.col-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-3); background: var(--surface-2); padding: 1px 8px; border-radius: 99px; }
.col-total { padding: 0 16px 12px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.col-body { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 14px; overflow-y: auto; min-height: 60px; }
.col-empty { text-align: center; color: var(--text-dim); font-size: 12.5px; padding: 22px; border: 1.5px dashed var(--line); border-radius: var(--r-md); }

.deal-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; cursor: grab; transition: all .15s ease; display: flex; flex-direction: column; gap: 11px; }
.deal-card:hover { border-color: var(--line-strong); background: var(--elevated); transform: translateY(-1px); }
.deal-card.dragging { opacity: .4; }
.deal-card:active { cursor: grabbing; }
.deal-name { font-size: 14.5px; }
.deal-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.deal-grip { width: 10px; height: 10px; border-radius: 3px; background: oklch(0.68 0.16 var(--hue)); flex-shrink: 0; margin-top: 4px; }
.deal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.deal-tag { font-size: 11px; font-weight: 500; color: var(--text-2); background: var(--bg); border: 1px solid var(--line); padding: 3px 8px; border-radius: 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-tag.more { color: var(--text-3); }
.deal-foot { display: flex; align-items: center; justify-content: space-between; }
.deal-val { font-size: 14.5px; font-weight: 700; }
.deal-date { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); }

.pipe-empty { flex: 1; display: grid; place-content: center; text-align: center; padding: 40px; }
.pipe-empty .mark { margin: 0 auto 14px; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); z-index: 50; display: flex; justify-content: flex-end; animation: fadeIn .2s ease; }
.drawer { width: min(440px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 26px 26px 18px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 26px; display: flex; flex-direction: column; gap: 24px; }
.dr-sec { display: flex; flex-direction: column; gap: 9px; }
.dr-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.dr-row svg { color: var(--text-3); flex-shrink: 0; }
.dr-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dr-stages { display: flex; flex-direction: column; gap: 6px; }
.dr-stage { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 500; text-align: left; transition: all .15s ease; }
.dr-stage:hover { background: var(--hover); color: var(--text); }
.dr-stage.on { border-color: var(--brand-blue-400); background: var(--blue-ghost); color: #fff; font-weight: 600; }
.dr-stage.past { opacity: .6; }
.dr-stage-dot { width: 9px; height: 9px; border-radius: 99px; background: oklch(0.68 0.16 var(--hue)); flex-shrink: 0; }
.drawer-foot { padding: 18px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }

/* Toast */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--elevated); border: 1px solid var(--line-strong); color: var(--text); padding: 13px 22px; border-radius: 99px; font-size: 14px; font-weight: 600; font-family: var(--font-display); box-shadow: var(--shadow-lg); z-index: 100; }

.nav-scrim { display: none; }

/* ---------- Boot / Auth ---------- */
.boot { height: 100vh; display: grid; place-content: center; position: relative; z-index: 1; }
.boot-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--brand-blue-400); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.side-logout { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-3); flex-shrink: 0; transition: all .15s ease; }
.side-logout:hover { background: var(--hover); color: var(--danger); }

.auth-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 34px 30px; box-shadow: var(--shadow-lg); }
.auth-brand { margin-bottom: 22px; }
.auth-title { font-size: 26px; margin-bottom: 6px; }
.auth-sub { color: var(--text-3); font-size: 14px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .ddbtn { margin-top: 4px; }
.auth-err { font-size: 13px; color: var(--danger); background: rgba(240,85,107,.1); border: 1px solid rgba(240,85,107,.25); border-radius: var(--r-md); padding: 10px 13px; }
.auth-msg { font-size: 13px; color: var(--success); background: var(--success-ghost); border: 1px solid rgba(47,207,122,.25); border-radius: var(--r-md); padding: 10px 13px; }
.auth-switch { margin-top: 20px; text-align: center; font-size: 13.5px; color: var(--text-3); }
.auth-switch button { color: var(--brand-blue-300); font-weight: 600; font-family: var(--font-display); }
.auth-switch button:hover { color: var(--brand-blue-400); }
.auth-restrito { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 13px; }
.auth-restrito svg { color: var(--text-dim); }
.auth-foot { font-size: 12px; color: var(--text-dim); }

/* ---------- Bloco "Enviar link para o cliente" (Etapa 4) ---------- */
.client-link-card { margin-top: 22px; background: var(--blue-ghost); border: 1px solid var(--blue-ghost-2); border-radius: var(--r-xl); padding: 22px; }
.clc-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-blue); color: #fff; flex-shrink: 0; box-shadow: 0 6px 16px rgba(0,74,173,.35); }
.clc-ready { margin-top: 14px; }
.clc-url { font-family: 'Sora', monospace; font-size: 12px; color: var(--text-2); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 13px; word-break: break-all; line-height: 1.5; max-height: 84px; overflow-y: auto; margin-bottom: 10px; }
.clc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.clc-err { margin-top: 12px; font-size: 13px; color: var(--danger); }
.clc-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 4px; color: var(--text-dim); font-size: 12.5px; }
.clc-divider::before, .clc-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Tela do cliente ---------- */
.client-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.client-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }
.client-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.client-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; overscroll-behavior: contain; }
.client-wrap { max-width: 760px; margin: 0 auto; padding: 34px 20px 24px; }
.client-foot { text-align: center; font-size: 12px; color: var(--text-dim); padding: 18px; }
.client-done, .client-error { text-align: center; padding: 40px 10px; display: flex; flex-direction: column; align-items: center; }
.client-done .seal { width: 70px; height: 70px; }
.diag-box { margin-top: 22px; text-align: left; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-size: 12.5px; color: var(--text-2); }
.diag-box summary { cursor: pointer; font-weight: 600; color: var(--text-3); font-family: var(--font-display); }
.diag-box ul { margin: 12px 0 8px; padding-left: 16px; display: flex; flex-direction: column; gap: 5px; }
.diag-box b { color: var(--text); }
.diag-box p { color: var(--text-3); font-size: 12px; margin-top: 8px; line-height: 1.5; }

/* Sticky mobile checkout bar (Etapa 2) — hidden on desktop */
.mob-checkout { display: none; }

/* ============================================================
   RESPONSIVO — Mobile first behaviors
   ============================================================ */
@media (max-width: 1080px) {
  .svc-pane { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .pay-card { grid-template-columns: 1fr; justify-items: center; }
  .pay-info { width: 100%; }
  .share-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; }
  .topbar { display: flex; }
  .step-label { display: none; }
  .step-pane, .stepper-wrap, .wiz-foot, .pipe-head { padding-left: 18px; padding-right: 18px; }
  .stepper { margin-bottom: 14px; }
  .board { padding-left: 18px; padding-right: 18px; grid-auto-columns: 270px; }
  .form-grid, .svc-editor-grid, .term-grid { grid-template-columns: 1fr; }
  .step-head h1 { font-size: 24px; }
  .term-cond { gap: 18px; }
  .form-card { padding: 20px; }
  .term, .pay-card, .accept-box, .panel { padding: 20px; }
  .pay-card { gap: 22px; }
  /* sidebar is off-canvas here, so a full-width sticky checkout bar is safe */
  .mob-checkout {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(17,20,26,0.92); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-strong);
  }
  .mob-checkout .ddbtn { flex: 1; max-width: 62%; }
  .svc-pane { padding-bottom: 92px; }
  .cart .cart-foot .ddbtn { display: none; }   /* CTA lives in the sticky bar now */
}

@media (max-width: 560px) {
  .step-pane { padding: 24px 16px 40px; }
  .step-pane.svc-pane { padding-bottom: 96px; }
  .svc-grid { grid-template-columns: 1fr; }
  .step-head h1, .pipe-head h1 { font-size: 22px; }
  .step-head p { font-size: 14px; }

  /* Wizard footer stacks: CTA on top (full width), Voltar below */
  .wiz-foot { flex-direction: column-reverse; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .wiz-foot .ddbtn { width: 100%; }
  .wiz-foot .ddbtn[data-variant="subtle"] { padding-top: 6px; padding-bottom: 6px; }

  /* Term document readability */
  .term { padding: 18px; }
  .term-head { flex-direction: column; gap: 12px; align-items: flex-start; }
  .term-head .col { align-items: flex-start !important; text-align: left !important; }
  .term-table { font-size: 12.5px; }
  .pay-amount .mono { font-size: 30px; }
  .pipe-search input { width: 100%; }
  .pipe-search { flex: 1; }
  .pipe-head .row.gap-3 { width: 100%; }
}
