/* ─── perfil.css v4 — Página de Perfil ───────────────────────────────────── */

.perfil-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.perfil-section {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 28px;
}

.perfil-section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a2a2a;
}
.perfil-section-title-row .perfil-section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.perfil-section-title {
  color: var(--gold, #d4a843);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Seção A — Conta ─────────────────────────────────────────────────────── */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.account-field label {
  color: #666;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.account-field .field-value {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 500;
}

.wallet-value {
  font-size: 11px !important;
  font-family: monospace;
  word-break: break-all;
  color: #aaa !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wallet-value:hover { color: var(--gold, #d4a843) !important; }
.copy-icon { font-size: 12px; opacity: 0.6; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.status-free    { background: #2a2a2a; color: #888; border: 1px solid #444; }
.status-vip     { background: linear-gradient(135deg, #3a2800, #5a4000); color: #FFD700; border: 1px solid #b8860b; }
.status-partner { background: linear-gradient(135deg, #2a1a4a, #3a2a6a); color: #bf80ff; border: 1px solid #7B3FBE; }
.status-banned  { background: linear-gradient(135deg, #3a0000, #5a0000); color: #ff6b6b; border: 1px solid #cc0000; }

/* ─── Seção B — Assinatura ────────────────────────────────────────────────── */
.benefit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #161616;
  border-radius: 8px;
  font-size: 13px;
  color: #ccc;
}

.sub-action-area {
  border-top: 1px solid #2a2a2a;
  padding-top: 20px;
  margin-top: 8px;
}

.coupon-area {
  margin-bottom: 16px;
}
.coupon-area label {
  display: block;
  color: #888;
  font-size: 12px;
  margin-bottom: 6px;
}
.coupon-row {
  display: flex;
  gap: 8px;
  max-width: 340px;
  margin: 0 auto;
}
.coupon-row input {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.coupon-row input:focus { outline: none; border-color: var(--gold, #d4a843); }

.coupon-valid   { color: #4caf50; font-size: 12px; margin-top: 4px; text-align: center; }
.coupon-invalid { color: #f55; font-size: 12px; margin-top: 4px; text-align: center; }

.btn-subscribe {
  background: linear-gradient(135deg, #b8860b, #FFD700);
  color: #1a1a1a;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-subscribe:hover   { opacity: 0.85; }
.btn-subscribe:disabled { opacity: 0.4; cursor: not-allowed; }

.vip-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #2a2000, #3a3000);
  border: 1px solid #b8860b;
  border-radius: 10px;
  padding: 16px 20px;
}

.vip-days-big {
  font-size: 36px;
  font-weight: 900;
  color: #FFD700;
  line-height: 1;
}
.vip-days-label { color: #aaa; font-size: 12px; }
.vip-expires { color: #888; font-size: 13px; }

/* ─── Seção C — Histórico ─────────────────────────────────────────────────── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.history-table th {
  color: #666;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #2a2a2a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.history-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #1a1a1a;
  color: #ccc;
}
.history-table tr:last-child td { border-bottom: none; }
.tx-link {
  color: var(--gold, #d4a843);
  text-decoration: none;
  font-family: monospace;
  font-size: 11px;
}
.tx-link:hover { text-decoration: underline; }

.empty-history {
  text-align: center;
  color: #555;
  padding: 32px 0;
  font-size: 14px;
}

/* ─── Seção D — Painel Partner ────────────────────────────────────────────── */
.partner-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.partner-stat-card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.partner-stat-val {
  font-size: 24px;
  font-weight: 800;
  color: #FFD700;
}
.partner-stat-label {
  color: #666;
  font-size: 11px;
  margin-top: 4px;
}

.coupon-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141414;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.coupon-code-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold, #d4a843);
  font-family: monospace;
  letter-spacing: 2px;
}
.btn-copy-coupon {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.btn-copy-coupon:hover { background: #333; color: #fff; }

.partner-wallet-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.partner-wallet-form input {
  flex: 1;
  min-width: 200px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
}
.partner-wallet-form input:focus { outline: none; border-color: var(--gold, #d4a843); }

/* ─── Seção Discord ───────────────────────────────────────────────────────── */
.discord-connect-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0 4px;
}

.discord-desc {
  color: #888;
  font-size: 13px;
  text-align: center;
  max-width: 440px;
  margin: 0;
  line-height: 1.5;
}

.btn-discord-connect {
  background: #5865F2;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-discord-connect:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn-discord-connect:active { transform: translateY(0); }

.discord-linked-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 14px 18px;
}

.discord-avatar-placeholder {
  font-size: 28px;
  width: 44px;
  height: 44px;
  background: #5865F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discord-info {
  flex: 1;
}

.discord-username {
  color: #e0e0e0;
  font-size: 15px;
  font-weight: 600;
}

.discord-status-tag {
  color: #4caf50;
  font-size: 12px;
  margin-top: 3px;
}

.btn-discord-unlink {
  background: transparent;
  border: 1px solid #555;
  color: #888;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-discord-unlink:hover    { border-color: #f55; color: #f55; }
.btn-discord-unlink:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 500px) {
  .discord-linked-row { flex-wrap: wrap; }
  .btn-discord-unlink { width: 100%; text-align: center; }
}

/* ─── Subscription Progress Overlay ──────────────────────────────────────── */
#sub-progress-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sub-progress-modal {
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
}
.sub-progress-modal h3 {
  color: var(--gold, #d4a843);
  margin-bottom: 20px;
  text-align: center;
}
.sub-progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: #555;
  font-size: 13px;
  transition: color 0.3s;
}
.sub-progress-step.active { color: var(--gold, #d4a843); }
.sub-progress-step.done   { color: #4caf50; }
.step-indicator { width: 20px; text-align: center; font-size: 14px; }

/* ─── Redirect to Login ───────────────────────────────────────────────────── */
.not-logged-gate {
  text-align: center;
  padding: 80px 20px;
}
.not-logged-gate h2 { color: var(--gold, #d4a843); margin-bottom: 12px; }
.not-logged-gate p  { color: #888; margin-bottom: 24px; }

@media (max-width: 600px) {
  .perfil-section { padding: 18px; }
  .account-grid { grid-template-columns: 1fr; }
  .btn-subscribe { width: 100%; justify-content: center; }
  .history-table { font-size: 11px; }
  .history-table th, .history-table td { padding: 7px 6px; }
}

/* ─── Payment method tabs (USDC / PIX) ───────────────────────────────────── */
.pay-tab-bar {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
  justify-content: center;
}

.pay-tab {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #888;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.pay-tab:hover { border-color: #666; color: #ccc; }
.pay-tab.active {
  background: linear-gradient(135deg, #2a1a00, #3a2800);
  border-color: var(--gold, #d4a843);
  color: var(--gold, #d4a843);
}

.pix-price-tag {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #4caf50;
  margin: 4px 0 16px;
  letter-spacing: 0.5px;
}

.btn-pix-action {
  background: linear-gradient(135deg, #1a3a1a, #2a5a2a) !important;
  color: #4caf50 !important;
  border: 1px solid #2a6a2a !important;
}
.btn-pix-action:hover { opacity: 0.85; }

.usdc-price-tag {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #FFD700;
  margin: 4px 0 16px;
  letter-spacing: 0.5px;
}

/* ─── Modal PIX QR Code ───────────────────────────────────────────────────── */
#pix-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pix-qr-modal {
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  border-radius: 16px;
  padding: 28px 24px 24px;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pix-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #4caf50;
  width: 100%;
  justify-content: center;
}

.pix-reused-badge {
  font-size: 11px;
  background: #2a3a2a;
  border: 1px solid #3a6a3a;
  color: #6ab06a;
  padding: 2px 8px;
  border-radius: 10px;
}

.pix-amount-label {
  font-size: 28px;
  font-weight: 900;
  color: #4caf50;
  line-height: 1;
}

.pix-qr-img {
  width: 220px;
  height: 220px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
  display: block;
}

.pix-qr-placeholder {
  width: 220px;
  height: 220px;
  background: #2a2a2a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 13px;
}

.pix-copy-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.pix-code-text {
  width: 100%;
  background: #141414;
  border: 1px solid #333;
  color: #888;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-family: monospace;
  resize: none;
  height: 60px;
  word-break: break-all;
}

.pix-countdown {
  font-size: 13px;
  color: #888;
}
#pix-timer {
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  color: #e0a020;
}

.pix-status {
  font-size: 14px;
  color: #888;
  text-align: center;
  min-height: 22px;
}
.pix-status-confirmed { color: #4caf50 !important; font-weight: 700; }
.pix-status-expired   { color: #e08020 !important; }

@media (max-width: 440px) {
  .pix-qr-modal { padding: 20px 14px; }
  .pix-qr-img, .pix-qr-placeholder { width: 180px; height: 180px; }
  .pay-tab { padding: 8px 14px; font-size: 13px; }
}
