/* Secretaria — Plataforma de Backoffice (Painel financeiro, Clientes, Faturas) */

/* ─────────── Page wrappers ─────────── */
.sec-page {
  padding: 32px 40px 80px;
  max-width: 1440px;
}
@media (max-width: 700px) { .sec-page { padding: 20px 18px 64px; } }

.sec-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.sec-breadcrumb svg { width: 14px; height: 14px; }
.sec-breadcrumb a { color: var(--text-muted); }
.sec-breadcrumb a:hover { color: var(--brand-blue); }
.sec-breadcrumb .sep { opacity: 0.5; }

.sec-page-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.sec-page-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--neutral-900);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.sec-page-head h1 svg { width: 26px; height: 26px; color: var(--brand-blue); }

/* ─────────── Top action bar ─────────── */
.sec-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
.sec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 0;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  text-decoration: none;
}
.sec-btn:active { transform: translateY(1px); }
.sec-btn svg { width: 16px; height: 16px; }
.sec-btn.dark { background: var(--brand-blue); color: white; }
.sec-btn.dark:hover { background: var(--brand-blue-dark); }
.sec-btn.outline {
  background: white;
  color: var(--neutral-900);
  border: 1px solid var(--border-default);
}
.sec-btn.outline { color: var(--brand-blue); border-color: var(--brand-blue); }
.sec-btn.outline:hover { background: rgba(14,147,242,0.06); border-color: var(--brand-blue-dark); color: var(--brand-blue-dark); }
.sec-btn.primary { background: var(--brand-blue); color: white; }
.sec-btn.primary:hover { background: var(--brand-blue-dark); }
.sec-btn.danger { background: var(--color-danger); color: white; }
.sec-btn.large { height: 46px; padding: 0 22px; font-size: 14px; }

/* ─────────── Generic card ─────────── */
.sec-card {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 22px 24px;
}
.sec-card-title {
  font-family: var(--font-akagi);
  font-weight: 700;
  font-size: 15px;
  color: var(--neutral-900);
  margin: 0 0 16px;
}

/* ─────────── KPI grid (Painel) ─────────── */
.sec-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .sec-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sec-kpis { grid-template-columns: 1fr; } }
.kpi {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 18px 22px;
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--neutral-900);
  letter-spacing: -0.5px;
}
.kpi-value.muted { color: var(--text-secondary); }
.kpi-value.danger { color: var(--color-danger); }
.kpi-value.success { color: var(--color-success); }
.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.2px;
}
.kpi-period {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ─────────── Painel layout ─────────── */
.sec-painel-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1100px) { .sec-painel-grid { grid-template-columns: 1fr; } }

.sec-chart-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.sec-toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.sec-toolbar-field label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}
.sec-toolbar-field input,
.sec-toolbar-field select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  background: white;
  color: var(--text-primary);
}

.sec-chart {
  width: 100%;
  height: 320px;
  display: block;
}
.sec-chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  justify-content: flex-end;
  margin-bottom: 8px;
}
.sec-chart-legend i {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ─────────── Tables ─────────── */
.sec-table-card {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
}
.sec-table-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-default);
}
.sec-table-head h3 {
  font-family: var(--font-akagi);
  font-weight: 700;
  font-size: 15px;
  color: var(--neutral-900);
  margin: 0;
}
.sec-table-head .right {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
}
.sec-table-head .badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--brand-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

.sec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sec-table thead th {
  background: var(--neutral-100);
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-default);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.sec-table thead th .sortable { cursor: pointer; user-select: none; }
.sec-table thead th .sortable::after {
  content: " ↕";
  opacity: 0.4;
  font-size: 11px;
}
.sec-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--neutral-200);
  color: var(--text-primary);
  vertical-align: middle;
}
.sec-table tbody tr:hover { background: var(--neutral-100); }
.sec-table tbody tr:last-child td { border-bottom: 0; }
.sec-table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sec-table .strong { font-weight: 700; color: var(--neutral-900); }
.sec-table .col-check { width: 32px; }
.sec-table .col-actions { width: 110px; text-align: right; white-space: nowrap; }
.sec-table .col-actions .ico-btn {
  background: transparent;
  border: 0;
  width: 28px; height: 28px;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sec-table .col-actions .ico-btn:hover { background: var(--neutral-200); color: var(--neutral-900); }
.sec-table .col-actions .ico-btn svg { width: 16px; height: 16px; }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.pill.success { background: rgba(39,133,86,0.12); color: var(--color-success); }
.pill.danger { background: rgba(208,62,62,0.12); color: var(--color-danger); }
.pill.warn { background: rgba(151,71,255,0.12); color: var(--color-warn); }
.pill.warning { background: rgba(232,156,63,0.14); color: #c97a14; }
.pill.muted { background: var(--neutral-200); color: var(--text-secondary); }
.pill.info { background: rgba(14,147,242,0.12); color: var(--brand-blue); }
.pill.solid-dark { background: var(--brand-blue); color: white; }
.pill.dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}

/* ─────────── Filters bar ─────────── */
.sec-filters {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.sec-filters-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: end;
}
.sec-filters-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.sec-filters-row.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .sec-filters-row, .sec-filters-row.cols-3, .sec-filters-row.cols-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sec-filters-row, .sec-filters-row.cols-3, .sec-filters-row.cols-6 { grid-template-columns: 1fr; } }
.sec-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sec-filter label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.sec-filter select,
.sec-filter input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  background: white;
  color: var(--text-primary);
}
.sec-filter-actions {
  display: inline-flex;
  gap: 8px;
}
.sec-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.sec-search input {
  flex: 1;
  max-width: 320px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  background: white;
}
.sec-show {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sec-show select { height: 30px; padding: 0 8px; border: 1px solid var(--border-default); border-radius: 4px; font-size: 12px; background: white; }

/* Toggle */
.sec-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.sec-toggle input { display: none; }
.sec-toggle .switch {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--neutral-300);
  position: relative;
  transition: background 0.15s ease;
}
.sec-toggle .switch::after {
  content: "";
  position: absolute;
  left: 2px; top: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s ease;
}
.sec-toggle input:checked + .switch { background: var(--color-success); }
.sec-toggle input:checked + .switch::after { transform: translateX(16px); }

/* ─────────── Pagination ─────────── */
.sec-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-default);
  background: white;
  flex-wrap: wrap;
  gap: 12px;
}
.sec-pagination .pages {
  display: inline-flex;
  gap: 4px;
}
.sec-pagination .pages a,
.sec-pagination .pages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--border-default);
}
.sec-pagination .pages a:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.sec-pagination .pages .active {
  background: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
}
.sec-pagination .pages .ellipsis { border: 0; background: transparent; }

/* ─────────── Detail page (cliente / fatura) ─────────── */
.sec-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 1100px) { .sec-detail-grid { grid-template-columns: 1fr; } }

.sec-profile {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 26px;
}
.sec-profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.sec-profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
}
.sec-profile-head h2 {
  margin: 0;
  font-family: var(--font-akagi);
  font-weight: 700;
  font-size: 18px;
  color: var(--neutral-900);
}
.sec-profile-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.sec-data-list { margin: 0; padding: 0; list-style: none; }
.sec-data-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 13px;
  color: var(--text-primary);
  gap: 12px;
}
.sec-data-list li:last-child { border-bottom: 0; }
.sec-data-list .lbl { color: var(--text-muted); font-size: 12px; }

/* Tabs */
.sec-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 18px;
}
.sec-tab {
  padding: 12px 18px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border-top: 0; border-left: 0; border-right: 0;
}
.sec-tab.is-active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

/* ─────────── Fatura detail ─────────── */
.sec-fatura {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 36px 40px;
  max-width: 760px;
  margin: 0 auto;
}
.sec-fatura-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}
.sec-fatura-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--neutral-900);
}
.sec-fatura-head p { margin: 0; color: var(--text-muted); font-size: 13px; }
.sec-fatura-amount {
  text-align: right;
}
.sec-fatura-amount .label { font-size: 12px; color: var(--text-muted); }
.sec-fatura-amount .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
}
.sec-fatura-section {
  border-top: 1px solid var(--neutral-200);
  padding: 22px 0;
}
.sec-fatura-section h4 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.sec-fatura-section .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .sec-fatura-section .row { grid-template-columns: 1fr; } }
.sec-fatura-section .row .lbl { font-size: 11px; color: var(--text-muted); }
.sec-fatura-section .row .val { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.sec-timeline { list-style: none; padding: 0; margin: 0; }
.sec-timeline li {
  position: relative;
  padding: 0 0 18px 26px;
  font-size: 13px;
  color: var(--text-primary);
}
.sec-timeline li::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand-blue);
}
.sec-timeline li::after {
  content: "";
  position: absolute;
  left: 10px; top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--neutral-300);
}
.sec-timeline li:last-child::after { display: none; }
.sec-timeline .when { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }

/* ─────────── Form grid ─────────── */
.sec-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 18px;
}
.sec-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .sec-form-grid { grid-template-columns: 1fr; } }
.sec-field { display: flex; flex-direction: column; gap: 6px; }
.sec-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.sec-field input,
.sec-field textarea,
.sec-field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  background: white;
  color: var(--text-primary);
}
.sec-field textarea { padding: 10px 12px; min-height: 80px; height: auto; resize: vertical; }
.sec-field input:focus, .sec-field textarea:focus, .sec-field select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(14,147,242,0.12);
}
.ico-btn {
  background: transparent;
  border: 0;
  width: 28px; height: 28px;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ico-btn:hover { background: var(--neutral-200); color: var(--neutral-900); }
.ico-btn svg { width: 16px; height: 16px; }

.sec-table tfoot td {
  padding: 14px 16px;
  background: var(--neutral-100);
  border-top: 1px solid var(--border-default);
}

/* Side list with radio-like items */
.sec-list-radio {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
}
.sec-list-radio li {
  padding: 12px 14px;
  border-bottom: 1px solid var(--neutral-200);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.sec-list-radio li:last-child { border-bottom: 0; }
.sec-list-radio li.is-active { background: rgba(14,147,242,0.06); border-left: 3px solid var(--brand-blue); padding-left: 11px; }
.sec-list-radio li.muted { opacity: 0.55; }
.sec-list-radio .title { font-weight: 600; font-size: 13px; color: var(--neutral-900); }
.sec-list-radio .meta { font-size: 11px; color: var(--text-muted); }

.var-chip {
  display: inline-block;
  padding: 4px 8px;
  background: var(--neutral-100);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  font-size: 11px;
  color: var(--neutral-900);
  font-family: monospace;
}

/* Steps timeline (régua) */
.sec-steps { list-style: none; margin: 0; padding: 18px 24px; }
.sec-steps > li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding-bottom: 14px;
}
.step-rail {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.step-pin {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 30px;
  background: var(--brand-blue); color: white;
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
}
.step-line {
  width: 2px; flex: 1; min-height: 16px;
  background: var(--neutral-300);
  margin-top: 6px;
}
.sec-steps > li:last-child .step-line { display: none; }
.step-card {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 14px 16px;
}
.step-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.step-msg {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--neutral-100);
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--brand-blue-soft, var(--brand-blue));
}
.step-actions {
  display: flex; gap: 4px; margin-top: 8px; justify-content: flex-end;
}

/* Inline timeline list */
.sec-timeline { list-style: none; padding: 0; margin: 0; }
.sec-timeline > li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 14px;
  padding: 10px 0;
  align-items: start;
  font-size: 13px;
}
.sec-timeline .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  background: var(--brand-blue);
}
.sec-timeline .dot.success { background: var(--color-success); }
.sec-timeline .dot.warning { background: #c97a14; }
.sec-timeline .dot.info { background: var(--brand-blue); }
.sec-timeline strong { display: block; color: var(--neutral-900); }
.sec-timeline span { display: block; font-size: 11px; color: var(--text-muted); }

/* color-warning fallback for inline styles */
:root {
  --color-warning: #c97a14;
}

/* ─────────── Régua de Cobrança ─────────── */
.sec-cobranca {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .sec-cobranca { grid-template-columns: 1fr; } }
.sec-cobranca-card {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 22px 24px;
}
.sec-cobranca-card h3 {
  font-family: var(--font-akagi);
  font-weight: 700;
  font-size: 15px;
  color: var(--neutral-900);
  margin: 0 0 6px;
}
.sec-cobranca-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}
.sec-cobranca-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 13px;
}
.sec-cobranca-row:last-of-type { border-bottom: 0; }
.sec-cobranca-row .timing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sec-cobranca-row .timing input {
  width: 36px;
  text-align: center;
  border: 0;
  border-bottom: 1px solid var(--border-default);
  background: transparent;
  font-size: 13px;
  color: var(--neutral-900);
}
.sec-cobranca-channels {
  display: inline-flex;
  gap: 16px;
}
.sec-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.sec-checkbox input { display: none; }
.sec-checkbox .box {
  width: 16px; height: 16px;
  border-radius: 3px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
}
.sec-checkbox input:checked + .box {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.sec-checkbox input:checked + .box::after {
  content: "";
  width: 8px; height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  margin-bottom: 2px;
}

/* ─────────── Public flow (responsável) ─────────── */
.pub-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  display: flex;
  flex-direction: column;
}
.pub-header {
  background: white;
  border-bottom: 1px solid var(--border-default);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pub-header img { height: 40px; }
.pub-header .pub-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--neutral-900);
  margin-left: 8px;
}
.pub-header .pub-help {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.pub-stepper {
  display: flex;
  justify-content: center;
  padding: 28px 32px 8px;
}
.pub-stepper-inner {
  display: flex;
  gap: 0;
  max-width: 720px;
  width: 100%;
}
.pub-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  font-size: 12px;
  color: var(--text-muted);
}
.pub-step .dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  z-index: 1;
}
.pub-step.is-done .dot { background: var(--color-success); border-color: var(--color-success); color: white; }
.pub-step.is-active .dot { background: var(--brand-blue); border-color: var(--brand-blue); color: white; }
.pub-step.is-active { color: var(--brand-blue); font-weight: 700; }
.pub-step::before, .pub-step::after {
  content: "";
  position: absolute;
  top: 14px;
  height: 2px;
  background: var(--border-default);
  z-index: 0;
  width: 50%;
}
.pub-step::before { left: 0; }
.pub-step::after { right: 0; }
.pub-step:first-child::before { display: none; }
.pub-step:last-child::after { display: none; }
.pub-step.is-done::before, .pub-step.is-done::after,
.pub-step.is-active::before { background: var(--color-success); }

.pub-content {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 24px 64px;
}
.pub-card {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 720px;
  padding: 40px 48px;
}
.pub-card.wide { max-width: 920px; }
@media (max-width: 700px) { .pub-card { padding: 28px 22px; } }

.pub-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--neutral-900);
  margin: 0 0 6px;
}
.pub-card .pub-sub { font-size: 14px; color: var(--text-muted); margin: 0 0 28px; }

.pub-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 20px;
}
.pub-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .pub-form-grid { grid-template-columns: 1fr; } }

.pub-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pub-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-900);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.pub-field label .req { color: var(--color-danger); margin-left: 2px; }
.pub-field input,
.pub-field textarea,
.pub-field select {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  background: white;
}
.pub-field textarea { padding: 12px 14px; min-height: 100px; height: auto; resize: vertical; }
.pub-field input:focus, .pub-field textarea:focus, .pub-field select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(14,147,242,0.12);
}

.pub-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}
.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.pub-btn:active { transform: translateY(1px); }
.pub-btn.primary { background: var(--brand-blue); color: white; }
.pub-btn.primary:hover { background: var(--brand-blue-dark); }
.pub-btn.success { background: var(--color-success); color: white; }
.pub-btn.success:hover { filter: brightness(0.95); }
.pub-btn.outline {
  background: white;
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
}
.pub-btn.outline:hover { background: rgba(14,147,242,0.06); border-color: var(--brand-blue-dark); color: var(--brand-blue-dark); }
.pub-btn.large { height: 54px; padding: 0 32px; font-size: 15px; border-radius: 10px; }
.pub-btn.full { width: 100%; }

/* ─────────── Contract (ZapSign-style) ─────────── */
.contract-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) { .contract-shell { grid-template-columns: 1fr; } }

.contract-doc {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
  padding: 52px 64px;
  font-family: "Georgia", "Cormorant Garamond", serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--neutral-900);
  max-height: 720px;
  overflow-y: auto;
}
@media (max-width: 700px) { .contract-doc { padding: 28px 22px; max-height: 480px; } }
.contract-doc h2 {
  text-align: center;
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 28px;
  font-weight: 700;
}
.contract-doc h3 {
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 24px 0 8px;
  font-weight: 700;
}
.contract-doc p { margin: 0 0 12px; text-align: justify; }
.contract-doc ol { padding-left: 22px; }
.contract-doc ol li { margin-bottom: 8px; }

.contract-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}
.contract-progress {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 18px 20px;
}
.contract-progress .title {
  font-weight: 700;
  font-size: 13px;
  color: var(--neutral-900);
  margin-bottom: 8px;
}
.contract-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--neutral-200);
  overflow: hidden;
}
.contract-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--brand-blue);
  width: 100%;
  transition: width 0.3s ease;
}
.contract-progress .meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.contract-card-action {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 20px;
}
.contract-card-action h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--neutral-900);
  font-weight: 700;
}
.contract-card-action p {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.signature-input {
  width: 100%;
  height: 56px;
  border: 2px dashed var(--border-default);
  border-radius: 8px;
  background: var(--neutral-100);
  text-align: center;
  font-family: "Caveat", "Brush Script MT", cursive;
  font-size: 28px;
  color: var(--neutral-900);
  padding: 0 12px;
  margin-bottom: 14px;
}
.signature-input:focus { outline: none; border-color: var(--brand-blue); background: white; }

/* ─────────── Checkout ─────────── */
.checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) { .checkout-shell { grid-template-columns: 1fr; } }

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 540px) { .method-grid { grid-template-columns: 1fr; } }
.method {
  background: white;
  border: 2px solid var(--border-default);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.method:hover { border-color: var(--brand-blue-soft); }
.method.is-selected {
  border-color: var(--brand-blue);
  background: rgba(14,147,242,0.04);
}
.method .ico {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--neutral-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
}
.method .ico svg { width: 22px; height: 22px; }
.method strong { display: block; color: var(--neutral-900); font-size: 14px; margin-bottom: 2px; }
.method em { font-style: normal; color: var(--text-muted); font-size: 12px; }

.installments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 540px) { .installments { grid-template-columns: repeat(2, 1fr); } }
.installments .opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  background: white;
  transition: border-color 0.15s ease;
}
.installments .opt:hover { border-color: var(--brand-blue-soft); }
.installments .opt.is-selected {
  border-color: var(--brand-blue);
  background: rgba(14,147,242,0.04);
}
.installments .opt strong { font-size: 13px; color: var(--neutral-900); }
.installments .opt span { font-size: 11px; color: var(--text-muted); }

.summary {
  background: white;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 24px;
  height: fit-content;
}
.summary h3 {
  margin: 0 0 16px;
  font-family: var(--font-akagi);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--neutral-200);
}
.summary-line:last-of-type { border-bottom: 0; }
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 2px solid var(--neutral-900);
  font-family: var(--font-display);
}
.summary-total .label { font-weight: 600; color: var(--neutral-900); font-size: 13px; }
.summary-total .value { font-weight: 700; color: var(--brand-blue); font-size: 26px; letter-spacing: -0.5px; }

/* Pix QR mock */
.pix-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--neutral-100);
  border-radius: 10px;
}
.pix-qr {
  width: 200px; height: 200px;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 50%/12px 12px;
  border: 8px solid white;
  border-radius: 6px;
  position: relative;
}
.pix-qr::after {
  content: "";
  position: absolute;
  inset: 36% 36%;
  background: white;
  border: 4px solid #000;
}
.pix-code {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-secondary);
  word-break: break-all;
  background: white;
  border: 1px dashed var(--border-default);
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  text-align: center;
}

/* ─────────── Confirmation ─────────── */
.confirm-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--color-success);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(39,133,86,0.25);
}
.confirm-icon svg { width: 44px; height: 44px; }

.invoice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
}
.invoice-list li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 13px;
  background: white;
}
.invoice-list li:last-child { border-bottom: 0; }
.invoice-list .num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.invoice-list .who { color: var(--neutral-900); font-weight: 600; }
.invoice-list .when { color: var(--text-muted); font-size: 12px; }
.invoice-list .val { font-weight: 700; color: var(--neutral-900); font-variant-numeric: tabular-nums; }
.invoice-list .pill { font-size: 9px; }
