/* ═══════════════════════════════════════════════════════════
   FIADO CERTO PRO — Stylesheet principal
   Paleta: azul profissional #1e3a5f | verde ação #25c76e
   Tipografia: Inter (Google Fonts)
══════════════════════════════════════════════════════════= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1e3a5f;
  --primary-light:#2a5298;
  --accent:       #25c76e;
  --accent-dark:  #1a9e56;
  --danger:       #e74c3c;
  --danger-dark:  #c0392b;
  --warning:      #f39c12;
  --bg:           #f0f4f8;
  --surface:      #ffffff;
  --border:       #dce3ec;
  --text:         #1a2332;
  --text-muted:   #6b7f99;
  --shadow-sm:    0 2px 8px rgba(30,58,95,.08);
  --shadow-md:    0 6px 24px rgba(30,58,95,.13);
  --radius:       12px;
  --radius-sm:    8px;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ─── Header / Topbar ───────────────────────────────────── */
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.topbar-brand span.logo-icon { font-size: 24px; }

.topbar-brand span.tagline {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.6);
  letter-spacing: .5px;
  display: block;
  margin-top: -2px;
}

#logoutBtn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
  display: none;
}
#logoutBtn:hover { background: rgba(255,255,255,.22); }

/* ─── Container central ─────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}

/* ─── Mensagem de feedback ───────────────────────────────── */
#msg {
  min-height: 22px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--danger);
  margin-bottom: 4px;
  text-align: center;
}

/* ─── Auth Section (Login + Cadastro) ───────────────────── */
#auth-section {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
  flex: 1;
  min-width: 280px;
  max-width: 360px;
}

.auth-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-card h2 .icon { font-size: 20px; }

/* ─── Formulários ────────────────────────────────────────── */
form { }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #f8fafc;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  display: block;
  margin: 5px 0;
}

input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,.12);
  background: #fff;
}

/* ─── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(30,58,95,.25);
}
.btn-primary:hover { background: var(--primary-light); box-shadow: 0 4px 14px rgba(30,58,95,.3); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37,199,110,.25);
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 3px 10px rgba(231,76,60,.2);
}
.btn-danger:hover { background: var(--danger-dark); }

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover { background: #e08e0b; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: #f0f4f8; color: var(--text); }

.btn-full { width: 100%; margin-top: 6px; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }

/* Compat — botões nativos dos forms */
form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(30,58,95,.25);
  transition: background .15s, transform .1s;
}
form button[type="submit"]:hover { background: var(--primary-light); }
form button[type="submit"]:active { transform: scale(.97); }

/* ─── Dashboard ──────────────────────────────────────────── */
#dashboard {
  display: none;
  margin-top: 28px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.dashboard-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

/* ─── Card de seção ──────────────────────────────────────── */
.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 24px;
}

.section-card h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--bg);
  padding-bottom: 12px;
}

/* ─── Form de cliente (3 colunas em desktop) ─────────────── */
.client-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 680px) {
  .client-form-grid { grid-template-columns: 1fr; }
}

.client-form-grid input { margin: 0; }

/* ─── Barra de busca ─────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.search-bar input {
  flex: 1;
  margin: 0;
}

/* ─── Lista de clientes ──────────────────────────────────── */
#clientList {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* O script.js gera HTML com <br> tags dentro dos <li>,
   por isso usamos block e não flex no li */
#clientList li {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: block;
  line-height: 1.9;
  transition: box-shadow .2s, border-color .2s;
}
#clientList li:hover {
  box-shadow: var(--shadow-sm);
  border-color: #bdd0e8;
  background: #fff;
}

/* Texto dentro dos li */
#clientList li > strong:first-child {
  color: var(--primary);
  font-size: 15.5px;
  font-weight: 700;
}
#clientList li strong { color: var(--primary); }
#clientList li span   { color: var(--text-muted); font-size: 13px; }

/* Ações dentro dos li */
.acoes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.acoes button {
  padding: 6px 13px;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.acoes button:hover { opacity: .88; }
.acoes button:active { transform: scale(.95); }

/* Botões dentro da lista — identificados por texto/classe via script */
.acoes button:nth-child(1) { background: var(--accent);   color: #fff; }
.acoes button:nth-child(2) { background: #25d366;         color: #fff; }
.acoes button:nth-child(3) { background: var(--danger);   color: #fff; }

/* Badge de status */
.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-pago    { background: #d4edda; color: #155724; }
.badge-devendo { background: #fde8e8; color: #991b1b; }

/* ─── Form Grid 2 colunas ────────────────────────────────── */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ─── Textarea ───────────────────────────────────────────── */
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #f8fafc;
  resize: vertical;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  display: block;
  margin: 5px 0;
}
textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,.12);
  background: #fff;
}

/* ─── Input date ─────────────────────────────────────────── */
input[type="date"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  display: block;
  margin: 5px 0;
  cursor: pointer;
}
input[type="date"]:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,.12);
}

/* ─── File upload ────────────────────────────────────────── */
input[type="file"] { display: none; }

.file-upload-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 5px 0;
}

.file-upload-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.file-upload-btn:hover { background: var(--primary-light); }

.file-name-display {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Form hint ──────────────────────────────────────────── */
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  display: block;
}

/* ─── Controles da lista ─────────────────────────────────── */
.list-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}

.list-controls input {
  flex: 2;
  min-width: 180px;
  margin: 0;
}

.list-controls select {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.list-controls select:focus { border-color: var(--primary-light); }

.btn-export {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.btn-export:hover   { background: var(--accent-dark); }
.btn-export:active  { transform: scale(.96); }

/* ─── Resumo mini ────────────────────────────────────────── */
.resumo-mini {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  align-items: center;
}
.resumo-mini strong { color: var(--primary); }
.resumo-alert {
  color: var(--danger);
  font-weight: 700;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .6; }
}

/* ─── Card de cliente ────────────────────────────────────── */
/* Substitui os antigos estilos #clientList li */
#clientList li.cliente-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  display: block;
  transition: box-shadow .2s, border-color .2s;
  overflow: hidden;
  line-height: normal;
}
#clientList li.cliente-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #bdd0e8;
}

/* Card vencido: borda e fundo vermelho leve */
#clientList li.card-vencido {
  border-color: #f5a0a0;
  background: #fffafa;
}
#clientList li.card-vencido .card-top { background: #fff5f5; }

/* Card pago: verde leve */
#clientList li.card-pago {
  border-color: #b2e0c8;
  background: #f7fff9;
  opacity: .92;
}
#clientList li.card-pago .card-top { background: #f0fff5; }

/* Topo do card */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px 10px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

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

.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.card-produto {
  font-size: 12.5px;
  color: var(--text-muted);
  background: #f0f4f8;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.card-debt {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* ─── Info row ───────────────────────────────────────────── */
.card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid #f0f4f8;
}

.card-venc { font-weight: 500; }

.venc-vencido {
  color: var(--danger);
  font-weight: 700;
}

.card-pgto { color: #155724; font-weight: 600; }

.doc-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
}
.doc-link:hover { text-decoration: underline; }

/* ─── Observações ────────────────────────────────────────── */
.card-obs {
  padding: 8px 18px;
  font-size: 13px;
  color: #5a6a7e;
  font-style: italic;
  background: #fffef0;
  border-bottom: 1px dashed var(--border);
}

/* ─── Histórico de pagamentos ────────────────────────────── */
.card-historico {
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.card-historico h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.hist-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hist-list li {
  display: flex;
  gap: 12px;
  font-size: 13px;
  padding: 5px 10px;
  background: var(--surface);
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
  line-height: 1.5;
}
.hist-data  { color: var(--text-muted); font-weight: 600; }
.hist-valor { color: var(--accent-dark); font-weight: 700; }
.hist-obs   { color: var(--text-muted); font-style: italic; }
.hist-vazio { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* ─── Ações do card ──────────────────────────────────────── */
#clientList .acoes {
  padding: 10px 14px;
  margin: 0;
  border-top: none;
  background: transparent;
}

/* Cores específicas por ação */
.btn-cobrar      { background: #25d366 !important; color: #fff !important; }
.btn-pagar       { background: var(--accent) !important; color: #fff !important; }
.btn-reabrir     { background: var(--warning) !important; color: #fff !important; }
.btn-hist        { background: #e8edf3 !important; color: var(--text) !important; }
.btn-pdf         { background: #6c5ce7 !important; color: #fff !important; }
.btn-whatsapp-pdf { background: #075e54 !important; color: #fff !important; }
.btn-remover     { background: var(--danger) !important; color: #fff !important; padding: 6px 10px !important; }

/* ─── Caixa de juros acumulados ──────────────────────────── */
.juros-box {
  padding: 10px 18px 12px;
  background: #fff8f0;
  border-top: 1px dashed #f5a0a0;
  border-bottom: 1px solid var(--border);
}

.juros-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.juros-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.juros-taxa {
  font-size: 12px;
  color: var(--text-muted);
  background: #fde8d0;
  padding: 2px 8px;
  border-radius: 20px;
}

.juros-valores {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
}

.juros-sep { color: var(--text-muted); font-weight: 700; }
.txt-juros { color: #c0392b; }
.juros-total { font-size: 14px; }
.juros-total strong { color: #c0392b; font-size: 15px; }

.btn-aplicar-juros {
  padding: 6px 14px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-aplicar-juros:hover  { background: #d35400; }
.btn-aplicar-juros:active { transform: scale(.96); }

/* ─── Select fields ──────────────────────────────────────── */
.select-field,
.select-field-sm {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  outline: none;
  width: 100%;
  margin: 5px 0;
}
.select-field-sm { width: auto; margin: 0; font-size: 13px; padding: 8px 10px; }
.select-field:focus,
.select-field-sm:focus { border-color: var(--primary-light); }

.config-label-mid {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Banner de trial ────────────────────────────────────── */
#trial-banner {
  margin-bottom: 18px;
}

.trial-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2a5298 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(30,58,95,.22);
}

.trial-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trial-icon { font-size: 26px; }

.trial-banner-left strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
}

.trial-sub {
  font-size: 13px;
  opacity: .85;
  margin-top: 2px;
  display: block;
}

.trial-sub strong {
  display: inline;
  color: #ffd166;
  font-size: 14px;
}

.trial-btn-pagar {
  background: #ffd166;
  color: #1a2332;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.trial-btn-pagar:hover  { background: #ffc233; }
.trial-btn-pagar:active { transform: scale(.96); }

/* ═══════════════════════════════════════════════════════════
   PAYWALL — Tela de acesso bloqueado / assinatura necessária
══════════════════════════════════════════════════════════= */

#paywall {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
}

.paywall-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(30,58,95,.13);
  padding: 44px 36px 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  border-top: 5px solid var(--primary);
  position: relative;
}

/* Ícone de cadeado animado */
.paywall-lock-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.paywall-lock-anim {
  font-size: 56px;
  animation: lock-pulse 2s ease-in-out infinite;
  display: inline-block;
  filter: drop-shadow(0 4px 8px rgba(30,58,95,.2));
}
@keyframes lock-pulse {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.08); }
}

.paywall-titulo {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  margin: 0 0 4px;
  letter-spacing: -.3px;
}

.paywall-subtitulo {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Badge de preço */
.paywall-preco-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  border-radius: 40px;
  padding: 8px 28px;
  margin-bottom: 20px;
}
.paywall-preco-val {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
}
.paywall-preco-per {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  font-weight: 500;
}

/* Divisor */
.paywall-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Título das instruções */
.paywall-instrucao-titulo {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 0 0 12px;
  text-align: left;
}

/* Passos de instrução */
.paywall-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 20px;
}

.paywall-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f4f7fb;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}

.step-num {
  background: var(--primary);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Destaque da chave Pix */
.paywall-chave {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 14.5px;
  color: var(--primary);
  background: #eef2ff;
  border-radius: 4px;
  padding: 1px 6px;
  margin-top: 3px;
  letter-spacing: .5px;
}

/* Botão copiar chave Pix */
.btn-paywall-copiar {
  width: 100%;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 2px dashed var(--primary-light);
  background: #f0f4ff;
  color: var(--primary);
  transition: background .2s, border-color .2s;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.btn-paywall-copiar:hover  { background: var(--primary); color: #fff; border-style: solid; }
.btn-paywall-copiar:active { transform: scale(.98); }

/* Feedback "Copiado" */
.paywall-copiado {
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
  margin: 0 0 12px;
  animation: fade-in .3s ease;
}
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Botão WhatsApp comprovante */
.btn-paywall-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0;
  transition: background .2s, transform .1s;
  width: 100%;
  box-sizing: border-box;
}
.btn-paywall-whatsapp:hover  { background: #1da851; }
.btn-paywall-whatsapp:active { transform: scale(.97); }

/* Botão liberar acesso (admin/suporte) */
.btn-paywall-liberar {
  width: 100%;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: 1.5px solid var(--accent);
  background: rgba(37,199,110,.07);
  color: var(--accent-dark);
  transition: background .2s, color .2s;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.btn-paywall-liberar:hover  { background: var(--accent); color: #fff; }
.btn-paywall-liberar:active { transform: scale(.98); }

/* Botão sair */
.btn-paywall-sair {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  width: 100%;
  transition: border-color .2s, color .2s;
  box-sizing: border-box;
}
.btn-paywall-sair:hover { border-color: var(--danger); color: var(--danger); }

/* Responsivo */
@media (max-width: 480px) {
  .paywall-card { padding: 32px 20px 28px; }
  .paywall-titulo { font-size: 20px; }
  .paywall-preco-val { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════════
   MINI-PDV — Tipo de lançamento + itens dinâmicos
══════════════════════════════════════════════════════════= */

/* Cabeçalho das colunas de itens */
.itens-header {
  display: grid;
  grid-template-columns: 1fr 52px 80px 72px 32px;
  gap: 6px;
  padding: 6px 10px;
  background: var(--primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.ih-qtd, .ih-unit, .ih-sub { text-align: right; }

/* Linha de produto */
.item-produto-row {
  display: grid;
  grid-template-columns: 1fr 52px 80px 72px 32px;
  gap: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-top: none;
  align-items: center;
}
.item-produto-row:nth-child(even) { background: #f0f4f8; }

.item-produto-row input {
  width: 100%;
  padding: 6px 8px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
}
.item-produto-row input:focus { border-color: var(--primary-light); }
.item-produto-row .item-qtd,
.item-produto-row .item-unit { text-align: right; }

/* Subtotal da linha */
.item-subtotal {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
  white-space: nowrap;
}

/* Botão remover linha */
.btn-rem-item {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
  transition: background .15s;
}
.btn-rem-item:hover { background: #fee2e2; }

/* Botão adicionar produto */
.btn-add-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  margin-top: 4px;
  border: 2px dashed var(--primary-light);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: #f0f4ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s;
  text-align: center;
}
.btn-add-item:hover { background: var(--primary); color: #fff; border-style: solid; }

/* Barra de total geral */
.itens-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
}
.itens-total-bar strong { font-size: 18px; }

/* Tags de itens no card da listagem */
.card-itens {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.card-item-tag {
  display: inline-block;
  background: #eef2ff;
  color: var(--primary);
  border-radius: 14px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 500;
}

/* Responsivo: colapsa em coluna no celular */
@media (max-width: 520px) {
  .itens-header {
    grid-template-columns: 1fr 40px 64px 60px 28px;
    font-size: 10px;
  }
  .item-produto-row {
    grid-template-columns: 1fr 40px 64px 60px 28px;
  }
}

/* ─── Estados lista ──────────────────────────────────────── */
.list-empty,
.list-loading {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  border: none !important;
  background: transparent !important;
}

/* ─── Configuração de lembretes ──────────────────────────── */
.config-alerta { display: flex; flex-direction: column; gap: 14px; }

.config-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.config-alerta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-alerta-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.config-alerta-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.config-alerta-inputs input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: var(--warning);
  height: 6px;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.dias-badge {
  background: var(--warning);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  min-width: 64px;
  text-align: center;
}

.config-alerta-inputs input[type="number"] {
  width: 70px !important;
  margin: 0;
  text-align: center;
}

.btn-salvar-alerta {
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.btn-salvar-alerta:hover  { background: var(--primary-light); }
.btn-salvar-alerta:active { transform: scale(.96); }

/* ─── Card de alerta (vencimento próximo) ────────────────── */
#clientList li.card-alerta {
  border-color: #f5c842;
  background: #fffdf0;
}
#clientList li.card-alerta .card-top {
  background: #fff9d6;
}

/* ─── Modal de lembretes ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 45, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 2px solid var(--bg);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

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

.modal-close-btn {
  background: var(--bg);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background .2s;
}
.modal-close-btn:hover { background: #dce3ec; color: var(--text); }

.modal-conteudo {
  overflow-y: auto;
  flex: 1;
  padding: 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Item de lembrete individual */
.lembrete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  flex-wrap: wrap;
}

.lembrete-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.lembrete-info strong {
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
  width: 100%;
}

/* Chips de urgência */
.alerta-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.chip-vencido { background: #fde8e8; color: #991b1b; }
.chip-hoje    { background: #fff3cd; color: #856404; }
.chip-proximo { background: #d4edda; color: #155724; }

/* Botão individual de cobrança no modal */
.btn-cobrar-lembrete {
  padding: 7px 14px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
  flex-shrink: 0;
}
.btn-cobrar-lembrete:hover  { background: #1da851; }
.btn-cobrar-lembrete:active { transform: scale(.96); }

/* Rodapé do modal */
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  border-top: 2px solid var(--bg);
  flex-wrap: wrap;
}

.btn-cobrar-todos {
  flex: 1;
  padding: 11px 18px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-cobrar-todos:hover  { background: #1da851; }
.btn-cobrar-todos:active { transform: scale(.97); }

.btn-modal-fechar {
  padding: 11px 18px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .2s;
}
.btn-modal-fechar:hover { background: #dce3ec; }

/* ═══════════════════════════════════════════════════════════
   AUDITORIA COMPLETA
══════════════════════════════════════════════════════════= */

/* Card container */
.audit-card { overflow: hidden; }

/* Cabeçalho da auditoria */
.audit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.audit-header h2 { margin-bottom: 0; }
.audit-header-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-audit-reload,
.btn-audit-csv,
.btn-audit-pdf {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid;
  transition: background .2s, color .2s;
  font-family: 'Inter', sans-serif;
}
.btn-audit-reload {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
.btn-audit-reload:hover { background: var(--border); }
.btn-audit-csv {
  background: rgba(37,199,110,.1);
  border-color: var(--accent);
  color: var(--accent-dark);
}
.btn-audit-csv:hover { background: var(--accent); color: #fff; }
.btn-audit-pdf {
  background: rgba(30,58,95,.08);
  border-color: var(--primary-light);
  color: var(--primary);
}
.btn-audit-pdf:hover { background: var(--primary); color: #fff; }

/* Alerta de irregularidades */
.audit-alerta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  animation: pulse-warn 1.5s ease-in-out infinite;
}
@keyframes pulse-warn {
  0%, 100% { border-color: #f59e0b; }
  50%       { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
}
.audit-alert-icon { font-size: 22px; flex-shrink: 0; }
.audit-alerta strong { display: block; color: #92400e; font-size: 14px; margin-bottom: 3px; }
.audit-alert-sub { font-size: 12.5px; color: #78350f; }

/* Filtros */
.audit-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.audit-filtros input,
.audit-filtros select {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .2s;
}
.audit-filtros input:focus,
.audit-filtros select:focus { border-color: var(--primary-light); }

/* Contador de registros */
.audit-count-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.audit-hint { margin-left: 6px; font-style: italic; }

/* Tabela */
.audit-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.audit-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: .2px;
}
.audit-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.audit-table tbody tr:last-child td { border-bottom: none; }
.audit-table tbody tr:nth-child(even) { background: #f8fafc; }
.audit-table tbody tr:hover { background: #f1f5f9; }

/* Linha com ação NEGADA — destaque vermelho */
.audit-row-negada { background: #fff1f2 !important; }
.audit-row-negada:hover { background: #ffe4e6 !important; }
.audit-row-negada td { color: #991b1b; }

/* Badges de status */
.audit-status-ok {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.audit-status-negada {
  display: inline-block;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Nome e papel do funcionário na tabela */
.audit-func-nome { font-weight: 600; }
.audit-papel     { color: var(--text-muted); font-style: italic; }

/* Estado de carregamento / vazio */
.audit-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Responsivo */
@media (max-width: 700px) {
  .audit-filtros input,
  .audit-filtros select { min-width: 100%; }
  .audit-header         { flex-direction: column; }
}

/* ─── Topbar: lado direito (badge + botão) ──────────────── */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Badge de papel (Dono / Funcionário) ───────────────── */
.role-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge-dono {
  background: rgba(37,199,110,.25);
  color: #25c76e;
  border: 1px solid rgba(37,199,110,.4);
}
.badge-func {
  background: rgba(243,156,18,.22);
  color: #f39c12;
  border: 1px solid rgba(243,156,18,.4);
}

/* ─── Seção de Funcionários ─────────────────────────────── */
.func-form { display: flex; flex-direction: column; gap: 14px; }

.perms-group { margin-top: 4px; }
.perms-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.perms-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  transition: border-color .2s, background .2s;
}
.perm-check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(37,199,110,.08);
}
.perm-check input { accent-color: var(--accent); width: 15px; height: 15px; }

.btn-criar-func {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
  transition: background .2s;
}
.btn-criar-func:hover { background: var(--accent-dark); }
.btn-criar-func:disabled { opacity: .6; cursor: not-allowed; }

.func-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
}
.func-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.func-nome { font-weight: 700; font-size: 14px; }
.func-email { color: var(--text-muted); font-size: 12px; }
.func-perms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.perm-tag {
  background: rgba(37,199,110,.12);
  color: var(--accent-dark);
  border: 1px solid rgba(37,199,110,.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
}
.perm-none { color: var(--text-muted); font-size: 12px; font-style: italic; }
.func-actions { display: flex; gap: 8px; }
.btn-danger-sm {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-danger-sm:hover { background: var(--danger); color: #fff; }

.sem-func {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}
.error-txt { color: var(--danger); font-size: 13px; }

/* ─── Histórico de Ações ─────────────────────────────────── */
.historico-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.historico-header h2 { margin-bottom: 0; }
.btn-reload-hist {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background .2s;
}
.btn-reload-hist:hover { background: var(--border); }

.acao-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.acao-row:last-child { border-bottom: none; }
.acao-tipo  { font-weight: 700; min-width: 170px; }
.acao-desc  { color: var(--text); flex: 1; min-width: 80px; }
.acao-valor {
  font-weight: 700;
  color: var(--accent-dark);
  min-width: 80px;
}
.acao-quem  { color: var(--text-muted); font-size: 12px; min-width: 120px; }
.acao-data  { color: var(--text-muted); font-size: 11px; min-width: 130px; text-align: right; }

/* ─── Responsivo ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .container   { padding: 20px 12px 40px; }
  .auth-card   { padding: 28px 20px; }
  .section-card { padding: 20px 14px; }
  .topbar-brand span.tagline { display: none; }
  .card-top    { flex-direction: column; }
  .card-right  { align-items: flex-start; flex-direction: row; gap: 8px; }
  .list-controls { flex-direction: column; }
  .list-controls input,
  .list-controls select,
  .btn-export  { width: 100%; }
}
