* {
  box-sizing: border-box;
}

:root {
  --bg: #05070d;
  --panel: #0b1020;
  --panel2: #101a33;
  --line: rgba(255,255,255,.10);
  --text: #f7fbff;
  --muted: #aab4c8;
  --gold: #ffd700;
  --gold2: #ffb800;
  --blue: #00bfff;
  --green: #22c55e;
  --red: #ff4d4d;
  --shadow: 0 24px 70px rgba(0,0,0,.45);
}

body.dark {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(0,191,255,.16), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(255,215,0,.13), transparent 28%),
    linear-gradient(180deg, #06111f, #05070d 48%, #08101f);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body.dark::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .20;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.top-warning {
  background: linear-gradient(135deg, var(--gold), var(--blue));
  color: #05070d;
  text-align: center;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
}

.app-header {
  background: rgba(5,7,13,.78);
  backdrop-filter: blur(18px);
  padding: 18px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: .95;
  letter-spacing: -.05em;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.5;
}

.content {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 34px 0;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  letter-spacing: -.04em;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.big-number {
  font-size: clamp(34px, 7vw, 64px);
  margin: 12px 0 4px;
  font-weight: 900;
  letter-spacing: -.07em;
  color: var(--gold);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
  line-height: 1.5;
}

.pill {
  background: rgba(255,215,0,.10);
  border: 1px solid rgba(255,215,0,.32);
  color: var(--gold);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

label {
  display: block;
  font-size: 12px;
  margin-top: 14px;
  margin-bottom: 6px;
  color: #dbe8ff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.045);
  color: #fff;
  font-size: 15px;
  outline: none;
}

select option {
  background: #0b1020;
  color: #fff;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0,191,255,.75);
  box-shadow: 0 0 0 4px rgba(0,191,255,.10);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 14px;
  transition: .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--blue));
  color: #05070d;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(255,215,0,.20);
}

.btn.secondary {
  background: var(--blue);
  color: #03111a;
  font-weight: 900;
}

.btn.ghost {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 800;
}

.btn.small {
  padding: 7px 12px;
  font-size: 12px;
}

.full-btn {
  width: 100%;
}

.error-text {
  color: #ff7b7b;
  font-size: 13px;
  margin-top: 10px;
}

.notice {
  margin-top: 18px;
  padding: 14px;
  background: rgba(0,191,255,.055);
  border: 1px solid rgba(0,191,255,.18);
  border-radius: 16px;
  font-size: 13px;
  color: #cbd5e8;
}

/* LOGO */
#login-screen .login-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
}

#login-screen .login-logo {
  height: 92px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.55));
}

/* BLOQUE NUEVO DE INVERSIÓN */
.investment-lead-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255,215,0,.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(0,191,255,.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
}

.investment-lead-card h2 {
  color: var(--gold);
  font-size: clamp(24px, 4vw, 36px);
}

.investment-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.investment-results div {
  padding: 16px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.investment-results span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.investment-results strong {
  display: block;
  color: var(--blue);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -.04em;
}

/* CHART */
.balance-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  background: rgba(0,0,0,.18);
  border-radius: 16px;
  border: 1px solid var(--line);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.status-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,215,0,.28);
  background: rgba(255,215,0,.07);
  color: var(--gold);
}

.actions-card {
  display: flex;
  gap: 12px;
}

.actions-card .btn {
  flex: 1;
  margin-top: 0;
}

/* TABLAS */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
}

.table th {
  font-weight: 900;
  color: var(--gold);
  background: rgba(255,215,0,.04);
}

.table td input[type="number"] {
  max-width: 130px;
}

.full-width {
  grid-column: 1 / -1;
  overflow-x: auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 900px) {
  .admin-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* POPUP */
.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.popup-backdrop.hidden {
  display: none;
}

.popup {
  background: #0b1020;
  padding: 22px;
  border-radius: 22px;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--gold);
  font-weight: 900;
}

/* WITHDRAWALS */
.withdrawals-card h2 {
  margin: 0;
  font-size: 18px;
}

.withdrawals-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.demo-badge {
  font-size: 12px;
  font-weight: 900;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--blue));
  color: #05070d;
  display: inline-block;
}

.withdrawals-table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
  background: rgba(5,7,13,.42);
  max-height: 260px;
}

.withdrawals-table thead th {
  background: rgba(255,215,0,.06);
  color: var(--gold);
  font-weight: 900;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  position: sticky;
  top: 0;
}

.withdrawals-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #e5e7eb;
}

.withdrawals-table tr:last-child td {
  border-bottom: none;
}

.withdrawals-table td:nth-child(2),
.withdrawals-table th:nth-child(2),
.withdrawals-table td:nth-child(3),
.withdrawals-table th:nth-child(3) {
  white-space: nowrap;
}

.withdrawals-footnote {
  margin: 12px 0 0;
  opacity: 0.9;
}

/* MODAL MÉTODOS DE INVERSIÓN */
#ckpay-modal.ckpay-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

#ckpay-modal.ckpay-open {
  display: block;
}

#ckpay-modal .ckpay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
}

#ckpay-modal .ckpay-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 28px);
  max-width: 540px;
  background: #0b1020;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

#ckpay-modal .ckpay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: rgba(255,255,255,.035);
  border-bottom: 1px solid var(--line);
}

#ckpay-modal .ckpay-title {
  font-weight: 900;
  font-size: 17px;
  color: var(--gold);
}

#ckpay-modal .ckpay-x,
#ckpay-modal .ckpay-back {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

#ckpay-modal .ckpay-body {
  padding: 16px;
}

#ckpay-modal .ckpay-hidden {
  display: none;
}

#ckpay-modal .ckpay-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 14px;
  margin: 10px 0;
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  color: #e5e7eb;
  cursor: pointer;
  font-weight: 900;
}

#ckpay-modal .ckpay-option:hover {
  border-color: rgba(0,191,255,.45);
  box-shadow: 0 0 24px rgba(0,191,255,.08);
}

#ckpay-modal .ckpay-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

#ckpay-modal .ckpay-arrow {
  margin-left: auto;
  opacity: .85;
  font-size: 20px;
}

#ckpay-modal .ckpay-badge {
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0,191,255,.12);
  border: 1px solid rgba(0,191,255,.30);
  color: var(--blue);
}

#ckpay-modal .ckpay-details {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  align-items: start;
}

#ckpay-modal .ckpay-qr {
  width: 100%;
  max-width: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 10px;
}

#ckpay-modal .ckpay-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#ckpay-modal .ckpay-label {
  font-weight: 900;
  font-size: 15px;
  color: #fff;
}

#ckpay-modal .ckpay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#ckpay-modal .ckpay-k {
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}

#ckpay-modal .ckpay-address {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  color: #e5e7eb;
}

#ckpay-modal .ckpay-copy {
  background: linear-gradient(135deg, var(--gold), var(--blue));
  color: #05070d;
  border: none;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 900;
  cursor: pointer;
}

#ckpay-modal .ckpay-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .app-header {
    padding: 16px;
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .content {
    width: min(94vw, 1100px);
    padding: 22px 0;
  }

  .card {
    padding: 18px;
    border-radius: 20px;
  }

  .card-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .investment-results {
    grid-template-columns: 1fr;
  }

  .actions-card {
    flex-direction: column;
  }

  .actions-card .btn {
    width: 100%;
  }

  .status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .table {
    min-width: 680px;
  }

  .withdrawals-table-wrap {
    overflow-x: auto;
  }

  #ckpay-modal .ckpay-details {
    grid-template-columns: 1fr;
  }

  #login-screen .login-logo {
    height: 76px;
  }

  .btn {
    width: 100%;
  }
}
.footer-pro {
  width: min(1100px, 92vw);
  margin: 40px auto;
  padding: 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
  color: var(--muted);
}

.footer-pro h3,
.footer-pro h4 {
  color: #fff;
  margin: 0 0 10px;
}

.footer-pro p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.5;
}

.footer-pro a {
  display: block;
  color: var(--gold);
  margin: 8px 0;
  font-weight: 800;
}

@media (max-width: 700px) {
  .footer-pro {
    grid-template-columns: 1fr;
  }
}
.hidden{
  display:none;
}

.withdraw-panel{
  margin-top:18px;
  border:1px solid rgba(255,215,0,.18);
}

.withdraw-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
}

.withdraw-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.withdraw-full{
  grid-column:1/-1;
}

@media(max-width:700px){
  .withdraw-grid{
    grid-template-columns:1fr;
  }
}
.ckpay-detail-icon{
  width:70px;
  height:70px;
  object-fit:contain;
  border-radius:18px;
  background:rgba(255,255,255,.08);
  padding:8px;
  margin-bottom:12px;
}

#ckpay-qr{
  max-width:220px;
  width:100%;
  background:#fff;
  border-radius:18px;
  padding:10px;
}