:root{
  --bg:#f5f2ea; --panel:#fff; --ink:#1c2430; --sub:#5a6472; --line:#e1dccd;
  --navy:#991b1b; --gold:#c5a059; --gold-soft:#f9f4e8; --good:#2e7d32; --bad:#b3261e;
}
*{box-sizing:border-box;}
body{
  background:var(--bg); color:var(--ink); margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
/* Navegação Superior */
.top-menu { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.menu-wrap { max-width: 600px; margin: 0 auto; display: flex; justify-content: center; align-items: center; padding: 12px 24px; }
.menu-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.menu-links a { color: var(--sub); text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 6px; transition: all 0.2s; white-space: nowrap; }
.menu-links a:hover { color: var(--navy); background: rgba(0,0,0,0.03); }
.menu-links a.active { color: #fff; background: var(--navy); }

@media (max-width: 480px) {
  .menu-wrap { padding: 8px 10px; }
  .menu-links { gap: 6px; }
  .menu-links a { font-size: 12px; padding: 6px 8px; }
}
.wrap{max-width:760px; margin:0 auto; padding: 24px 16px;}
.kicker{font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--gold); font-weight:700;}
h1{font-size:22px; margin:4px 0 10px;}
p.sub{color:var(--sub); font-size:14px; line-height:1.5;}
.card{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:20px; margin-bottom:16px;}
label{display:block; font-size:13px; font-weight:600; margin:0 0 6px;}
.hint{font-size:12px; color:var(--sub); font-weight:400; margin-top:-2px; margin-bottom:6px;}
input[type=text], input[type=email], input[type=date], input[type=tel], select{
  width:100%; padding:10px 12px; border-radius:9px; border:1px solid var(--line);
  font-size:14.5px; background:#fbfaf6; font-family:inherit;
}
.grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.grid .full{grid-column:1/-1;}
@media (max-width:520px){ .grid{grid-template-columns:1fr;} }
.field{margin-bottom:14px;}
.radio-row{display:flex; gap:18px;}
.radio-opt{display:flex; align-items:center; gap:6px; font-size:14px;}
.radio-opt input{width:auto;}
#exalt-extra, #exalt-sim{
  border-left:3px solid var(--gold); padding:12px 14px; background:var(--gold-soft);
  border-radius:0 8px 8px 0; margin-top:8px;
}
button{
  font-size:14px; font-weight:700; border-radius:9px; padding:12px 20px;
  border:1px solid var(--navy); background:var(--navy); color:#fff; cursor:pointer; font-family:inherit;
}
button:disabled{opacity:.6; cursor:not-allowed;}
table{width:100%; border-collapse:collapse; font-size:12.5px;}
th, td{border:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:top;}
th{background:var(--navy); color:#fff;}
tr:nth-child(even){background:#faf7f0;}
.table-wrap{overflow-x:auto;}

@media (max-width: 768px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { position: absolute; top: -9999px; left: -9999px; }
  tr { border: 1px solid var(--navy); border-radius: 8px; margin-bottom: 16px; background: #fff !important; overflow: hidden; }
  td { border: none; border-bottom: 1px solid var(--line); position: relative; padding: 8px 8px 8px 45%; min-height: 34px; text-align: right; word-break: break-word; }
  td:last-child { border-bottom: 0; }
  td:before { position: absolute; top: 8px; left: 8px; width: 40%; padding-right: 10px; white-space: nowrap; font-weight: 600; color: var(--navy); content: attr(data-label); text-align: left; overflow: hidden; text-overflow: ellipsis; }
}

.count{font-weight:700; color:var(--navy);}
a.back{font-size:13px;}
.msg-erro{color:var(--bad); font-size:13px; margin-top:8px;}
.msg-ok{color:var(--good); font-size:13px; margin-top:8px;}
[hidden]{display:none !important;}

/* Modal de Detalhes */
.modal { border: none; border-radius: 12px; padding: 24px; max-width: 600px; width: 95%; background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.modal::backdrop { background: rgba(0,0,0,0.6); }
.modal-close { float: right; font-size: 28px; line-height: 20px; font-weight: bold; cursor: pointer; color: var(--sub); }
.modal-close:hover { color: var(--bad); }
.detalhe-item { margin-bottom: 12px; font-size: 14px; line-height: 1.4; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.detalhe-item:last-child { border-bottom: none; margin-bottom: 0; }
.detalhe-item strong { display: block; font-size: 12.5px; color: var(--sub); margin-bottom: 2px; }
.btn-detalhes { background: transparent; border: 1px solid var(--navy); color: var(--navy); padding: 6px 14px; border-radius: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.btn-detalhes:hover { background: var(--navy); color: #fff; }

/* Modal de Edição (reaproveita .modal) */
.modal-close-editar { float: right; font-size: 28px; line-height: 20px; font-weight: bold; cursor: pointer; color: var(--sub); }
.modal-close-editar:hover { color: var(--bad); }

/* Barra de progresso (fundadores mínimos) */
.progress-outer { background: var(--line); border-radius: 999px; height: 22px; overflow: hidden; margin-bottom: 20px; }
.progress-inner {
  height: 100%; width: 0%; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; white-space: nowrap;
  transition: width 0.5s ease; box-sizing: border-box;
}
.progress-inner.progress-completo { background: var(--good); }

/* Card financeiro */
.fin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 520px) { .fin-grid { grid-template-columns: 1fr; } }
.fin-item { display: flex; flex-direction: column; gap: 4px; background: #fbfaf6; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.fin-label { font-size: 12px; color: var(--sub); font-weight: 600; }
.fin-valor { font-size: 20px; font-weight: 700; color: var(--navy); }
.fin-valor.fin-ok { color: var(--good); }
.fin-valor.fin-pendente { color: var(--bad); }

/* Premium Gate UI */
#gate {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 32px;
  box-shadow: 0 12px 36px rgba(31, 56, 100, 0.08);
  border: none;
  background: #ffffff;
  border-top: 5px solid var(--gold);
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
#gate:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(31, 56, 100, 0.12);
}
#gate .icon-lock {
  width: 56px;
  height: 56px;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
#gate p.sub {
  font-size: 15px;
  margin-bottom: 28px;
  color: #667085;
}
#gate input {
  background: #f8fafc;
  border-color: #e2e8f0;
  transition: all 0.3s ease;
  padding: 14px 16px;
  font-size: 15px;
}
#gate input:focus {
  background: #fff;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(31, 56, 100, 0.1);
  outline: none;
}
#gate button {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  margin-top: 12px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(31, 56, 100, 0.25);
  transition: all 0.3s ease;
}
#gate button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 56, 100, 0.35);
}

/* Indicador de Online */
.online-indicator { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--sub); background: var(--panel); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); }
.pulse-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 125, 50, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); } }

/* Abas de Navegação (Membros Ativos / Desativados) */
.tabs-lista {
  display: flex;
  gap: 10px;
  margin: 18px 0 16px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 10px;
}
.tab-btn {
  background: #fff;
  color: var(--sub);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.tab-btn:hover {
  background: var(--gold-soft);
  color: var(--ink);
  border-color: var(--gold);
}
.tab-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: 0 2px 6px rgba(153, 27, 27, 0.25);
}
.tab-badge {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.badge-status-desativado {
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
}
.badge-status-ativo {
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
}
.btn-reativar {
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-reativar:hover {
  background: #1b5e20;
}
.btn-desativar-acao {
  background: #fff;
  color: #991b1b;
  border: 1px solid #991b1b;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-desativar-acao:hover {
  background: #fee2e2;
}
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--sub);
  font-size: 14.5px;
}
