/*
================================================
 CryptoWise Dashboard Styles - PRO PREMIUM (PARTE 1)
================================================
*/

body {
  background: #181A1E;
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: #e4e6eb;
}

.cw-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 15px 70px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* --- MODIFICACIÓN: Nuevo contenedor de cabecera sólo para 5 secciones --- */
.header-container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 64px;
  padding-top: 0; /* Se ajusta en móvil */
  padding-left: 0;
  padding-right: 0;
}

/* --- MODIFICACIÓN: Logo autoajustable --- */
.logo-pro-izq {
  max-width: 135px;
  max-height: 55px;
  width: auto;
  height: auto;
  display: block;
  margin-left: 0;
  margin-right: 0;
  filter: drop-shadow(0 3px 14px #223c70a6);
}

/* --- MODIFICACIÓN: Hamburguesa especial para cards (layout estandarizado) --- */
.hamburger-menu {
  position: absolute;
  right: 1.5rem;     /* 24px desde borde derecho del card */
  top: 1.5rem;       /* 24px arriba: alineación visual */
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
  transition: transform 0.3s ease;
}
.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3.2px;
  background: linear-gradient(90deg, #1597ff 10%, #3ea6ff 90%);
  border-radius: 6px;
  margin: 0;
  transition: 0.22s;
}

/* --- LOGO DASHBOARD PRINCIPAL --- */
.logo-bar {
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
}
.logo-pro-big {
  width: 180px;
  max-width: 200px;
  max-height: 80px;
  margin: 0 auto 9px auto;
  display: block;
}

/* --- HEADER DASHBOARD PRINCIPAL --- */
.dashboard-header-row {
  width: 100%;
  max-width: 990px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: flex-end; /* MOD MÓVIL - Para alinear saludo y hamburguesa abajo */
  justify-content: space-between;
  position: relative;
  min-height: 64px;
  padding-top: 0;
}
.fintech-title-left {
  font-size: 2.16rem;
  font-weight: 700;
  color: #f4f6fa;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  text-shadow: 0 1.5px 9px #203a6037;
}

/* === MODIFICACIÓN MOBILE (saludo y hamburguesa y cards simétricos) === */
@media (max-width: 600px) {
  .dashboard-header-row {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100vw;
    align-items: flex-end !important; /* MOD MÓVIL - saludo y menú al mismo nivel vertical */
    min-height: 58px !important;      /* MOD MÓVIL - altura mínima menor */
  }
  .fintech-title-left {
    color: #1597ff !important;           /* MOD MÓVIL - azul CryptoWise */
    font-size: 1.24rem !important;       /* MOD MÓVIL - tamaño más pequeño */
    font-weight: 800;
    margin: 0 0 0 18px !important;       /* MOD MÓVIL - alineado interior del card */
    padding: 0 0 6px 0 !important;       /* MOD MÓVIL - baja saludo para alinearlo con hamburguesa */
    text-shadow: none;
    letter-spacing: 0;
    line-height: 1.13;                   /* MOD MÓVIL - compacto y verticalmente alineado */
  }
  .menu-hamburger {
    width: 42px !important;              /* MOD MÓVIL - +15% ancho */
    height: 32px !important;
    margin-top: 0 !important;
    margin-right: 12px;
    align-self: flex-end !important;     /* MOD MÓVIL - verticalmente alineado abajo */
    display: flex;
    justify-content: center;
    background: none;
  }
.menu-hamburger span {
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #1597ff 10%, #3ea6ff 90%);
  border-radius: 6px;
  margin-bottom: 5px;
  transition: 0.22s;
}
.menu-hamburger span:last-child {
  margin-bottom: 0;
}

  /* ---- MOD MÓVIL - CARDS SIMÉTRICOS ---- */
  .cw-card,
  .cw-card-estandar {
    width: 94vw !important;           /* MOD MÓVIL - ancho simétrico, no pegado a borde */
    max-width: 99vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 13px !important;
    padding-right: 13px !important;
  }
  .dashboard-cards {
    width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }
}
/* === FIN MODIFICACIÓN MOBILE === */
/* CONTROL VISIBILIDAD DE TABS DASHBOARD */
.dashboard-tab-section {
  display: none;
  width: 100%;
  margin: 0 auto;
}
.dashboard-tab-section.activo,
.dashboard-tab-section[style*="display:block"] {
  display: block !important;
}
/* --- MODIFICACIÓN: Cards estándar (desktop) --- */
.cw-card-estandar {
  background: #1B202B;
  border-radius: 22px;
  box-shadow: 0 6px 22px #10101a38, 0 1.5px 0.5px #223a;
  padding: 32px 32px 30px 32px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 550px;
  width: 90%;
  margin: 36px auto 0 auto;
  transition: box-shadow .14s, transform .12s;
  align-items: flex-start;
  min-height: 200px;
}
.cw-card-estandar:hover {
  box-shadow: 0 10px 32px #203a601f;
  transform: translateY(-2px) scale(1.01);
}
.cw-card-centro {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* --- DASHBOARD CARDS (no modificar estas si no es necesario para el layout) --- */
.dashboard-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .dashboard-cards,
  .header-container,
  .cw-card-estandar {
    grid-template-columns: 1fr;
    max-width: 98vw;
    width: 98vw;
  }
}
@media (max-width: 600px) {
  .dashboard-cards {
    grid-template-columns: 1fr !important;
  }
}
.cw-card {
  background: #1B202B;
  border-radius: 22px;
  box-shadow: 0 6px 22px #10101a38, 0 1.5px 0.5px #223a;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: box-shadow .14s, transform .12s;
    min-height: 200px;
}
.cw-card:hover {
  box-shadow: 0 10px 32px #203a601f;
  transform: translateY(-2px) scale(1.01);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 11px;
}
.card-title {
  font-weight: 800;
  font-size: 1.16rem;
  color: #eaf1fb;
  letter-spacing: 0.01em;
  margin-left: 0;
  text-shadow: 0 1px 7px #293c5323;
}
.risk-tag {
  display: inline-block;
  margin-left: 66px;
  min-width: 92px;
  padding: 2.5px 3px;
  border-radius: 6px;
  font-size: 1.02em;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
  background: #232733;
  color: #fff;
  position: relative;
  top: -1.5px;
  transition: background 0.2s, color 0.2s;
  border: none;
}

/* MODERADO: naranja */
.risk-tag[data-valor*="oderado"] {
  background: #ffa94d;
  color: #fff;
}
/* ARRIESGADO: rojo */
.risk-tag[data-valor*="rriesgad"] {
  background: #ff6f6f;
  color: #fff;
}
/* CONSERVADOR: verde */
.risk-tag[data-valor*="onservador"] {
  background: #32bc63;
  color: #fff;
}

.stat-row { display: flex; flex-direction: column; gap: 12px; flex-grow: 1; justify-content: center; }
.stat-box { display: flex; justify-content: space-between; align-items: center; }
.label { font-size: 1.04rem; color: #99a2b5; font-weight: 600; }
.value { font-size: 1.27rem; font-weight: 700; color: #1eacfc; letter-spacing: -0.02em; }
.return { font-size: 1.16rem; font-weight: 800; color: #2de370; }
.return[data-retorno^="-"] { color: #fa3636; }

.cw-separator {
  height: 1px;
  background: #253353;
  margin: 10px 0 15px 0;
  border: none;
}
.crypto-logo, .rec-icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 7px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px #7ab3f9b0);
}
.asset-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.asset-row:last-child { margin-bottom: 0; }
.asset-amount { font-weight: 700; color: #3ea6ff; font-size: 1.08rem; }

/* === HISTORIAL === */
.history-scroll {
  max-height: 330px;
  overflow-y: auto;
  padding-right: 3px;
  margin-bottom: 2px;
}
.history-item {
  background: #222637;
  border-radius: 12px;
  padding: 6px 9px 7px 10px;
  margin-bottom: 7px;
  box-shadow: 0 1.5px 7px #0c101c14;
  font-size: 1.01rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.history-label { color: #7cb1f8; font-weight: 700; font-size: 1.01rem; margin-right: 4px; }
.history-empty {
  color: #888;
  text-align: center;
  font-size: 1.05rem;
  padding: 13px 0;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-box { margin: 0; }
#capitalChart, #rendimientoMensualChart {
  width: 100% !important;
  max-width: 100%;
  height: 122px !important;
  margin-top: 16px;
  margin-bottom: 0;
  display: block;
}
#capitalChart { margin-top: 22px; }
.quick-actions { display: flex; gap: 10px; margin-bottom: 20px; }

.btn-primary {
  background: linear-gradient(90deg, #2196F3 0%, #14d8ff 100%);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-weight: 700;
  font-size: 1.08rem;
  padding: 11px 0;
  width: 48%;
  cursor: pointer;
  box-shadow: 0 2px 10px 0 #00c4ff28;
  transition: background .2s;
}
.btn-primary:hover { background: linear-gradient(90deg, #0e71c9 0%, #03c5ff 100%); }
.btn-outline {
  background: transparent;
  border: 1.5px solid #3ea6ff;
  color: #3ea6ff;
  border-radius: 11px;
  font-weight: 600;
  font-size: 1.01rem;
  padding: 11px 0;
  width: 48%;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: #3ea6ff; color: #fff; }

.recommendations { margin-top: 8px; }
.rec-title { font-weight: 800; color: #b4cdfd; margin-bottom: 10px; font-size: 1.01rem; }
.rec-asset { display: flex; align-items: center; margin-bottom: 9px; }
.rec-icon { width: 19px; margin-right: 8px; }
.rec-tag { background: #d6f9e7; color: #097a2d; border-radius: 8px; font-weight: 700; font-size: 0.97rem; padding: 3px 11px; margin-left: 7px; }
.rec-tag.alt { background: #e5f1fe; color: #1063a8; }
.rec-more { color: #7cb1f8; text-decoration: underline; margin-left: 11px; font-size: .99rem; }

.dashboard-footer {
  width: 100%;
  text-align: center;
  color: #5f7ba5;
  font-size: .93rem;
  padding: 30px 0 13px 0;
  letter-spacing: .02em;
  background: transparent;
  margin-top: 22px;
}
/* =========== PERFIL =========== */
.profile-page-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile-card {
  background-color: #1B202B;
  border-radius: 16px;
  padding: 24px;
  color: #EAEAEA;
}
.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #253353;
}
.avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  background-color: #007BFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: #FFF;
}
.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}
.user-name { font-size: 1.5rem; font-weight: 600; }
.member-since { font-size: 0.9rem; color: #A9A9A9; opacity: 0.8; }
.verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(45, 227, 112, 0.1);
  color: #2de370;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}
.profile-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 32px;
  padding: 24px 0;
  border-bottom: 1px solid #253353;
}
.info-column { display: flex; flex-direction: column; gap: 20px; }
.info-item { display: flex; align-items: center; gap: 12px; }
.info-icon { color: #8892b0; }
.info-text { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 0.85rem; color: #A9A9A9; opacity: 0.8; }
.info-value { font-size: 1rem; font-weight: 500; display: flex; align-items: center; gap: 8px; text-transform: capitalize; }
.info-value[style*="text-transform: none;"] { text-transform: none !important; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.blue { background-color: #007BFF; }
.status-dot.green { background-color: #2de370; }

.profile-card-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
}
.progress-bar-container { width: 100%; }
.progress-label { font-size: 0.9rem; margin-bottom: 8px; display: block; }
.progress-bar { width: 100%; height: 8px; background-color: #253353; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background-color: #007BFF; border-radius: 4px; transition: width 0.3s ease; }
.btn-edit-profile {
  background-color: transparent;
  border: 1px solid #007BFF;
  color: #007BFF;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
  align-self: flex-end;
}
.btn-edit-profile:hover,
.btn-edit-profile:focus { background-color: rgba(0, 123, 255, 0.1); }

.verification-card { background-color: #1B202B; }
.verification-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 16px 0; }
.verification-level {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2B2D42;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.level-badge { padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: 0.9rem; }
.level-badge.yellow { background-color: rgba(253, 162, 42, 0.1); color: #fda22a; }
.verification-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.verification-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.verification-list li.verified { color: #2de370; }
.verification-list li.pending { color: #fda22a; }
.btn-improve-verification {
  width: 100%;
  background-color: #2B2D42;
  border: none;
  color: #EAEAEA;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.btn-improve-verification:hover,
.btn-improve-verification:focus { background-color: #3c3f58; }

/* Modal edición perfil */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 22, 37, 0.87);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}
.modal-content {
  background-color: #1A1B2E;
  border: 1px solid #2D2F45;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2D2F45;
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.modal-header h2 { margin: 0; font-size: 1.5rem; }
.close-button {
  background: none;
  border: none;
  color: #A9A9A9;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}
.close-button:hover { color: #fff; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #A9A9A9;
}
.form-group input {
  width: 100%;
  padding: 12px;
  background-color: #2B2D42;
  border: 1px solid #3c3f58;
  border-radius: 8px;
  color: #EAEAEA;
  font-size: 1rem;
  box-sizing: border-box;
}
.form-group input:focus { outline: none; border-color: #007BFF; }
.modal-footer { text-align: right; margin-top: 24px; }
.btn-save-changes {
  background-color: #007BFF;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn-save-changes:hover { background-color: #0056b3; }
/* Responsive perfil, modal y layout */
@media (min-width: 768px) {
  .profile-card-body { grid-template-columns: 1fr 1fr; }
  .profile-card-footer { flex-direction: row; align-items: center; }
  .progress-bar-container { flex-grow: 1; }
}
@media (max-width: 650px) {
  .cw-container { padding-left: 10px; padding-right: 10px; }
  .dashboard-header-row { padding-left: 5px; padding-right: 5px; }
  .logo-pro-big { width: 105px; margin-bottom: 15px; }
  .drawer-menu { width: 70vw !important; right: -70vw; }
  .cw-card { padding: 20px; }
  .header-container {
    max-width: 99vw;
    width: 99vw;
    padding-top: 0.5rem;
    min-height: 54px;
  }
  .logo-pro-izq {
    max-width: 98px;
    max-height: 40px;
  }
  .hamburger-menu {
    right: 0.70rem;
    top: 1.70rem;
    width: 22px;
    height: 20px;
  }
  .cw-card-estandar {
    max-width: 99vw;
    width: 92vw;
    padding: 20px 12px 18px 12px;
    margin: 20px auto 0 auto;
  }
}

/* --- Modal CryptoWise --- */
.cw-modal-overlay {
  position: fixed;
  z-index: 99999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(18,24,38,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 2vw;
}
.cw-modal-overlay.active {
  display: flex;
}
.cw-modal-content {
  background: #1B202B;
  border-radius: 19px;
  box-shadow: 0 8px 38px #0008, 0 1.5px 0.5px #223a;
  padding: 32px 20px 24px 20px;
  width: 99vw;
  max-width: 430px;
  min-width: 0;
  color: #eaf1fb;
  position: relative;
  animation: popmodal .22s cubic-bezier(.5,1.5,.3,1) 1;
}
@keyframes popmodal {
  0% {transform: scale(0.85);}
  100% {transform: scale(1);}
}
.cw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cw-modal-close {
  background: none;
  border: none;
  font-size: 2.3rem;
  color: #3ea6ff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 7px;
  transition: color .18s;
  line-height: 1;
}
.cw-modal-close:hover {
  color: #ff6961;
  background: #1b263b22;
}
.cw-modal-body {
  font-size: 1.09rem;
  color: #eaf1fb;
  padding-bottom: 6px;
}
.cw-modal-body input[type="password"], .cw-modal-body input[type="text"], .cw-modal-body input[type="number"] {
  width: 100%;
  padding: 13px 10px;
  margin: 7px 0 14px 0;
  border-radius: 8px;
  border: 1.3px solid #3ea6ff;
  background: #23293a;
  color: #eaf1fb;
  font-size: 1.12rem;
  box-sizing: border-box;
}
.cw-modal-body .btn-primary {
  width: 100%;
  margin-top: 7px;
  margin-bottom: 9px;
  font-size: 1.13rem;
}
.cw-modal-body .seed-box {
  display: block;
  background: #23272f;
  border-radius: 9px;
  color: #ffad3b;
  padding: 15px 12px;
  margin: 9px 0 13px 0;
  font-size: 1.15rem;
  font-family: 'Fira Mono', 'Consolas', 'Courier', monospace;
  word-break: break-word;
  max-width: 100%;
  line-height: 1.4;
  overflow-x: auto;
}
.cw-modal-body .address-box {
  display: block;
  background: #1e283b;
  border-radius: 9px;
  color: #3ea6ff;
  padding: 13px 12px;
  margin: 10px 0 13px 0;
  font-size: 1.09rem;
  font-family: 'Fira Mono', 'Consolas', 'Courier', monospace;
  word-break: break-all;
  max-width: 100%;
}
.cw-modal-body .success {
  color: #2de370;
  font-weight: 600;
}
.cw-modal-body .danger {
  color: #fa3636;
  font-weight: 600;
}
.cw-modal-body .cw-divider {
  margin: 18px 0 13px 0;
  border-top: 1.5px solid #232c36;
  opacity: .95;
}

/* --- Selector de red premium (branding CryptoWise) --- */
.cw-net-select {
  background: #222733;
  border-radius: 13px;
  border: 1.6px solid #293a52;
  width: 98%;
  max-width: 320px;
  margin-top: 5px;
  margin-bottom: 8px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 7px #222a3610;
  font-size: 1.07rem;
}
.cw-net-selected {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  font-weight: 700;
}
.cw-net-logo {
  width: 26px; height: 26px;
  margin-right: 10px;
  border-radius: 13px;
  box-shadow: 0 1.5px 5px #222a3665;
  background: #181b20;
  object-fit: contain;
}
.cw-net-label {
  margin-right: 7px;
  font-size: 1.05rem;
  font-weight: 700;
}
.cw-net-ticker {
  color: #2196f3;
  font-weight: 700;
  font-size: 1.06rem;
  margin-left: 5px;
}
.cw-net-dropdown {
  background: #181a22;
  border-radius: 13px;
  border: 1.2px solid #293a52;
  position: absolute;
  top: 44px; left: 0; right: 0;
  z-index: 90;
  box-shadow: 0 2.5px 22px #223c705c;
  animation: popmodal .19s;
}
.cw-net-option {
  display: flex; align-items: center;
  padding: 12px 12px;
  transition: background .13s;
  cursor: pointer;
}
.cw-net-option.selected, .cw-net-option:hover {
  background: #2196f310;
}
.cw-net-option .cw-net-logo { margin-right: 11px; }

/* --- Token selector visual premium --- */
.cw-token-options {
  display: flex; gap: 12px; margin-bottom: 11px;
}
.cw-token-option {
  display: flex; align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 8px;
  background: #1f2638;
  border: 1.3px solid #2b3850;
  cursor: pointer;
  transition: border .17s, background .18s;
  font-weight: 700;
  font-size: 1.06rem;
  color: #eaf1fb;
}
.cw-token-option.selected, .cw-token-option:hover {
  background: #232d47;
  border-color: #2196f3;
}
.cw-token-logo {
  width: 21px;
  height: 21px;
  margin-right: 5px;
  border-radius: 50%;
  background: #161b20;
  box-shadow: 0 1px 4px #20305c44;
}
.cw-token-name {
  margin-right: 7px;
  font-size: 1.07rem;
}
.cw-token-desc {
  color: #3ea6ff;
  font-size: 0.97rem;
  font-weight: 600;
}
.cw-balance-row {
  display: flex; align-items: center;
  gap: 10px; margin-top: 6px; margin-bottom: 6px;
}
.cw-balance-amount {
  font-weight: 700; font-size: 1.13rem;
  color: #2de370;
}
.cw-divider {
  margin: 16px 0 13px 0;
  border-top: 1.5px solid #232c36;
  opacity: .95;
}
/* --- Sin scroll lateral para direcciones --- */
.address-box {
  overflow-x: auto !important;
  white-space: normal !important;
  max-width: 99vw;
}

/* Responsive MODAL wallet premium */
@media (max-width: 600px) {
  .cw-modal-content {
    padding: 16px 7vw 18px 7vw !important;
    max-width: 100vw !important;
  }
  .cw-modal-header {
    padding-right: 1vw;
    margin-bottom: 7px;
  }
  .cw-modal-body input[type="password"], .cw-modal-body input[type="text"], .cw-modal-body input[type="number"] {
    font-size: 1.06rem;
    padding: 11px 7px;
  }
  .cw-modal-body .seed-box, .cw-modal-body .address-box {
    font-size: 1.07rem;
    padding: 10px 6px;
    margin: 7px 0 10px 0;
  }
  .cw-modal-body .copy-btn {
    padding: 6px 15px;
    font-size: 0.98rem;
      .cw-card,
  .cw-card-estandar {
    min-height: 220px;
  }
  }
}

/* Drawer lateral */
.drawer-menu {
  position: fixed;
  top: 0; right: -480px;
  height: 100vh;
  width: 340px;
  background: #1B202B;
  box-shadow: -5px 0 34px #0008, -1.5px 0.5px #223a;
  z-index: 99999;
  transition: right 0.33s cubic-bezier(.5,1.5,.3,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 240px;
}
.drawer-menu.open { right: 0; }
.drawer-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(18,24,38,0.82);
  z-index: 99998;
  display: none;
  transition: opacity 0.15s;
}
.drawer-backdrop.active { display: block; }
.drawer-content { padding: 30px 18px 14px 18px; }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.drawer-logo {
  width: 95px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 13px #223c70a6);
  margin-left: 16px; /* <-- Añade esto para alinear el logo con los textos */
}
.drawer-close {
  font-size: 2.3rem;
  color: #3ea6ff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 5px;
  border-radius: 7px;
  transition: color .18s;
  font-weight: 700;
  line-height: 1;
}
.drawer-close:hover { color: #ff6961; background: #1b263b22; }
.drawer-list { list-style: none; padding: 0; margin: 0; }
.drawer-list li { margin-bottom: 14px; }
.drawer-list a {
  display: block;
  color: #eaf1fb;
  font-size: 1.17rem;
  font-weight: 600;
  padding: 13px 17px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.12s, color 0.13s;
  letter-spacing: .02em;
}
.drawer-list a.drawer-active,
.drawer-list a:hover {
  background: linear-gradient(90deg,#1597ff1a 10%,#3ea6ff22 90%);
  color: #3ea6ff;
}
.drawer-logout a {
  color: #f96a6a !important;
  font-weight: 700;
  background: #2d202b20;
}
@media (max-width: 650px) {
  .drawer-menu { width: 70vw !important; right: -70vw; }
}

/* --- FIN DEL ARCHIVO CSS --- */
/* -- FIX FINAL: Menú Hamburguesa PREMIUM -- */
.menu-hamburger {
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  width: 38px !important;
  height: 34px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 12px 0 0 !important;
  box-sizing: border-box !important;
}
.menu-hamburger span {
  display: block !important;
  width: 25px !important;
  height: 2.8px !important;
  background: linear-gradient(90deg, #1597ff 10%, #3ea6ff 90%) !important;
  border-radius: 6px !important;
  margin-bottom: 6px !important;
  opacity: 1 !important;
  transition: 0.2s;
}
.menu-hamburger span:last-child { margin-bottom: 0 !important; }

/* -- FIX FINAL: Dashboard principal cards simétricos móvil -- */
@media (max-width: 600px) {
  .dashboard-cards {
    width: 90vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }
  .dashboard-cards .cw-card {
    width: calc(100vw - 26px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 18px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }
}
/* === MODAL PREMIUM EDITAR PERFIL ADAPTADO A MÓVIL & DARK === */
.cw-modal-overlay {
  position: fixed;
  z-index: 99999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(8, 10, 16, 0.62); /* negro puro, menos azul, más pro */
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0; margin: 0;
}
.cw-modal-content {
  background: #1b1e25;
  border-radius: 22px;
  box-shadow: 0 0 38px #151629a0;
  padding: 22px 17px 16px 17px;
  width: 97vw;
  max-width: 400px;
  min-width: 0;
  color: #e4e6eb;
  position: relative;
  animation: modalPop .24s cubic-bezier(.28,.6,.5,1.1);
  box-sizing: border-box;
}
.cw-modal-close {
  position: absolute; top: 13px; right: 19px; font-size: 2.1em; color: #3ea6ff; cursor: pointer;
  z-index: 3;
}
.cw-modal-content h2 {
  margin-top: 0;
  font-size: 1.42em;
  font-weight: 700;
  margin-bottom: 17px;
  letter-spacing: -1px;
}
.cw-modal-content label {
  display: block;
  margin-bottom: 7px;
  margin-top: 17px;
  color: #e4e6eb;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: -.01em;
}
.cw-modal-content input,
.cw-modal-content select {
  width: 92%;
  max-width: 340px;
  margin: 0 auto 14px auto;
  display: block;
  font-size: 1.08em;
  padding: 13px 13px 13px 15px;
  border: 1.7px solid #1e90ff;
  background: #232734;
  color: #e4e6eb;
  border-radius: 12px;
  transition: border-color .2s, background .2s;
  outline: none;
  box-sizing: border-box;
}
.cw-modal-content input:focus,
.cw-modal-content select:focus {
  border-color: #3ea6ff;
  background: #232e41;
}
.cw-modal-content .btn-primary {
  width: 100%;
  margin-top: 20px;
  font-size: 1.08em;
  padding: 13px 0;
  border-radius: 14px;
  background: linear-gradient(90deg,#1597ff 8%,#3ea6ff 90%);
  border: none;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 16px #1995ff33;
  transition: background .2s, box-shadow .2s;
}
.cw-modal-content .btn-primary:active {
  background: linear-gradient(90deg,#1e74cc 8%,#1995ff 90%);
  box-shadow: 0 1px 4px #0c324e99;
}
@keyframes modalPop {
  from { transform: scale(.98) translateY(32px); opacity: .19; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
/* Móvil: más centrado y scrollable */
@media (max-width: 600px) {
  .cw-modal-content {
    width: 97vw;
    min-width: unset;
    max-width: 99vw;
    padding: 7vw 3vw 7vw 3vw;
    border-radius: 18px;
    box-shadow: 0 4px 30px #10123bfa;
  }
  .cw-modal-content h2 { font-size: 1.16em; }
  .cw-modal-content input,
  .cw-modal-content select {
    font-size: 1.01em;
    padding: 13px 11px 13px 13px;
    max-width: 95vw;
    width: 94%;
  }
}
/* ==== CARDS PERSONALIZADOS POR SECCIÓN ==== */

.cw-card-aportaciones {
  min-height: 450px !important;
  margin-top: 6px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 400px !important;
  width: 86vw !important;
  padding-top: 20px !important;
  padding-left: 18px !important;
  padding-right: 24px !important;
  padding-bottom: 18px !important;
}

.cw-card-documentacion {
  min-height: 450px !important;
  margin-top: 6px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 400px !important;
  width: 86vw !important;
  padding-top: 20px !important;
  padding-left: 18px !important;
  padding-right: 24px !important;
  padding-bottom: 18px !important;
}

.cw-card-wallet-propia {
  min-height: 450px !important;
  margin-top: 6px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 400px !important;
  width: 86vw !important;
  padding-top: 20px !important;
  padding-left: 18px !important;
  padding-right: 24px !important;
  padding-bottom: 18px !important;
}

.cw-card-wallet-cw {
  min-height: 450px !important;
  margin-top: 6px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 400px !important;
  width: 86vw !important;
  padding-top: 20px !important;
  padding-left: 18px !important;
  padding-right: 24px !important;
  padding-bottom: 18px !important;
}


.cw-card-aportaciones .card-header,
.cw-card-documentacion .card-header,
.cw-card-wallet-propia .card-header,
.cw-card-wallet-cw .card-header {
  margin-bottom: 13px;
}

.cw-card-wallet-propia {
  min-height: 380px;
}
.cw-card-wallet-cw {
  min-height: 350px;
}
.cw-card-wallet-cw .coming-soon {
  position: absolute;
  bottom: 18px;
  right: 24px;
  color: #3ea6ff;
  font-weight: 700;
  font-size: 1.08rem;
  opacity: 0.74;
  letter-spacing: 0.03em;
}
@media (max-width: 600px) {
  .cw-card-aportaciones,
  .cw-card-documentacion,
  .cw-card-wallet-propia,
  .cw-card-wallet-cw {
    max-width: 97vw;
    width: 99vw;
    min-height: 250px;
    padding: 18px 5vw 32px 5vw;
    margin-top: 10px;
    margin-bottom: 18px;
  }
  .cw-card-wallet-propia { min-height: 300px; }
  .cw-card-wallet-cw { min-height: 260px; }
  .cw-card-wallet-cw .coming-soon {
    font-size: 0.96rem;
    right: 7vw;
    bottom: 10px;
  }
}
.tooltip {
  position: relative;
  display: inline-block;
  color: inherit;          /* <--- Usa el color del texto padre */
  font-size: 1.1em;
  cursor: pointer;
  margin-left: 4px;
  user-select: none;
}

.tooltip::after {
  content: attr(title);
  display: none;
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  background: #222e3a;
  color: #fff;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.93em;
  white-space: pre-line;
  box-shadow: 0 4px 22px rgba(0,0,0,0.23);
  z-index: 22;
  pointer-events: none;
  min-width: 180px;
  max-width: 240px;
  opacity: 0;
  transition: opacity 0.15s;
}

.tooltip:hover::after,
.tooltip:focus::after,
.tooltip.show::after {
  display: block;
  opacity: 1;
}
.history-label {
  color: #24b0ff;      /* Azul fintech para los nombres de campos */
  font-weight: 600;
  margin-right: 3px;
}

.history-value {
  color: #fff;         /* Valor en blanco */
  font-weight: 500;
  margin-right: 14px;
}
.history-value.fecha,
.history-value.tipo,
.history-value.cantidad,
.history-value.activo,
.history-value.nota {
  /* Puedes personalizar individualmente si quieres matices */
}
.history-item {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: #242634;
  border-radius: 12px;
  padding: 13px 13px 7px 13px;
  font-size: 1.09em;
  /* Opcional sombra para destacar */
  /* box-shadow: 0 2px 9px rgba(34,46,58,0.13); */
}
.history-item {
  margin-bottom: 13px;
  border-radius: 13px;
  background: #242634;
  padding: 12px 13px 8px 13px;
}

.history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}

.history-label {
  color: #24b0ff;
  font-weight: 600;
  margin-right: 2px;
  min-width: 64px;   /* para que alineen bien */
}

.history-value {
  color: #fff;
  font-weight: 500;
  margin-right: 14px;
  min-width: 48px;
}

.history-value.cantidad {
  min-width: 65px;
}

.history-row:first-child .history-label,
.history-row:first-child .history-value {
  margin-bottom: 0;
}

@media (max-width: 450px) {
  .history-row { gap: 7px; }
  .history-label { min-width: 56px; }
  .history-value { min-width: 40px; }
  .history-value.cantidad { min-width: 54px; }
}
.mensaje-rendimiento {
  font-size: 1.03em;
  font-weight: 500;
  color: #b8eec2;
  margin-bottom: 8px;
}
.card-evolucion-capital {
  min-height: 340px; /* Puedes subirlo a 370/400 si quieres más aire */
  padding-bottom: 24px;
}
@media (max-width: 640px) {
  .card-evolucion-capital {
    min-height: 290px;
    padding-bottom: 12px;
  }
}
.chart-box canvas#evolucionCapitalChart {
  height: 200px !important;
  max-height: 260px;
  margin-top: 0 !important;
}
.legend-pill {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1.05em;
  background: #232733;
  border-radius: 17px;
  padding: 3px 18px 3px 8px;
  box-shadow: 0 2px 8px 0 rgba(36,44,70,0.04);
  color: #b7c9df;
  letter-spacing: 0.02em;
  transition: background 0.18s;
}
.legend-dot {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 8px;
}
.legend-dot-blue { background: linear-gradient(120deg,#20a4fa,#57e1fd 80%);}
.legend-dot-green { background: linear-gradient(120deg,#20e09e,#4dfa57 80%);}
.legend-pill.invertido { border: 1.6px solid #29b3ff22; }
.legend-pill.actual   { border: 1.6px solid #21e0aa22; }
.chart-legend-custom {
  display: flex;
  gap: 16px;
  margin-top: 3px !important;
  margin-bottom: 20px !important;
  align-items: center;
  flex-wrap: wrap;
}
.quick-actions-flex {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}
.btn-primary-gradient, .btn-primary-gradient-outline {
  border-radius: 14px;
  padding: 6px 55px;
  font-weight: 600;
  font-size: 1em;
  background: linear-gradient(90deg, #00d0fe 10%, #20f263 90%);
  color: #222a36;
  border: none;
  box-shadow: 0 1px 8px #18203040;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: box-shadow 0.16s, transform 0.16s;
}
.btn-primary-gradient-outline {
  background: transparent;
  border: 1.6px solid #00d0fe;
  color: #00d0fe;
}
.btn-primary-gradient:hover, .btn-primary-gradient-outline:hover {
  box-shadow: 0 2px 16px #00d0fe60;
  transform: translateY(-2px) scale(1.04);
}
.quick-actions-pro .quick-icon {
  margin-right: 4px;
  color: #00d0fe;
}
.quick-recommendation-pro {
  margin-top: 9px;
  background: #222A36;
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.quick-recommendation-pro .rec-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #20f263;
  margin-right: 13px;
}
.rec-asset-pro {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.rec-asset-pro .rec-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rec-asset-pro .rec-name {
  font-weight: 600;
  color: #fff;
}
.rec-asset-pro .rec-tip {
  font-size: 0.98em;
  color: #00d0fe;
}
.rec-asset-pro .rec-more-link {
  margin-left: 14px;
  color: #20f263;
  font-size: 0.96em;
  text-decoration: underline;
  cursor: pointer;
}
.quick-recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.rec-row {
  display: flex;
  align-items: center;
  background: #222a36;
  border-radius: 19px;
  padding: 9px 18px 9px 13px;
  gap: 12px;
}

.rec-row .rec-icon {
  width: 34px;
  height: 34px;
  margin-right: 7px;
  flex-shrink: 0;
}

.rec-row .rec-name {
  font-weight: 600;
  color: #fff;
  min-width: 112px;
  font-size: 1.09em;
}

.rec-row .rec-badge {
  margin-left: 8px;
  margin-right: 12px;
  border-radius: 22px;
  font-size: 1em;
  font-weight: 600;
  padding: 4px 16px;
  white-space: nowrap;
  min-width: 108px;
  text-align: center;
}
.rec-row .badge-green  { background: linear-gradient(90deg,#00d0fe 10%,#20f263 90%); color: #012018;}
.rec-row .badge-blue   { background: linear-gradient(90deg,#10bfff 0%,#24aafe 90%); color: #001925;}
.rec-row .badge-yellow { background: linear-gradient(90deg,#ffe45a 0%,#ffe184 100%); color: #605300;}
.rec-row .badge-orange { background: linear-gradient(90deg,#ffa954 0%,#ffcc7a 100%); color: #442600;}
.rec-row .badge-pink   { background: linear-gradient(90deg,#ff81cb 0%,#fdc2d3 100%); color: #59003e;}
.rec-row .badge-purple { background: linear-gradient(90deg,#be8fff 0%,#a995ff 100%); color: #1d093c;}

.rec-row .rec-more-link {
  color: #20f263;
  font-size: 1.07em;
  margin-left: auto;
  text-decoration: underline;
  font-weight: 500;
  transition: color .13s;
}
.rec-row .rec-more-link:hover { color: #00d0fe;}
.rec-more-link svg {
  vertical-align: middle;
  transition: transform 0.13s cubic-bezier(.5,1.7,.5,.9);
}
.rec-more-link:hover svg {
  transform: translateX(3px);
}

.cw-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}
.cw-tooltip-text {
  display: none;
  position: absolute;
  bottom: 120%; left: 50%; transform: translateX(-50%);
  min-width: 180px; max-width: 260px;
  background: #20293c;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 4px 16px #141b2855;
  font-size: 0.97em;
  z-index: 50;
  pointer-events: none;
}
.cw-tooltip.active .cw-tooltip-text {
  display: block;
  animation: fadeInTooltip .18s;
  pointer-events: auto;
}
@keyframes fadeInTooltip { from{opacity:0} to{opacity:1} }
.aportaciones-card {
  background: #181e29;
  border-radius: 1.4em;
  padding: 2.3em 1.5em 2.1em 1.5em;
  margin-bottom: 2.4em;
  color: #fff;
  max-width: 510px;
  margin-left: auto; margin-right: auto;
}
.aportaciones-header {
  display: flex;
  align-items: center;
  gap: .9em;
  font-size: 1.32em;
  font-weight: 700;
  margin-bottom: 1.1em;
  letter-spacing: .03em;
}
.aportaciones-icon { width: 1.8em; }
.aportaciones-total {
  font-size: 1.18em;
  margin-bottom: 1.2em;
  font-weight: 600;
  color: #22a8fa;
}
.aportaciones-historial { margin-top: .9em; }
.aportaciones-item {
  background: #19213a;
  border-radius: .9em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1em 1.1em .9em 1.1em;
  margin-bottom: .9em;
  box-shadow: 0 2px 10px #0a182e20;
  font-size: 1.04em;
}
.aportaciones-cantidad { font-weight: 700; color: #22f8c2; }
.aportaciones-nota { color: #8bcfff; font-size: .98em; margin-left: 1.2em;}
.aportaciones-fecha { color: #b0b9d9; font-size: .97em; }
.aportaciones-item {
  margin-bottom: 0.9em;  /* <-- Añade o ajusta el valor */
}

/* Separador solo entre filas, no en la última */
.aportaciones-item:not(:last-child) {
  border-bottom: 0px solid #232a3d;
}
.cw-modal {
  position: fixed; left:0; top:0; width:100vw; height:100vh;
  background: rgba(15,18,34,0.73); z-index: 99;
  display: flex; align-items: center; justify-content: center;
}
.cw-modal-content {
  background: #181e29; color: #fff; border-radius: 1.2em; padding: 2em 1.7em;
  min-width: 300px; max-width: 96vw;
  box-shadow: 0 8px 40px #0a172f68;
  position: relative;
}
.cw-modal-close {
  position: absolute; top: 1em; right: 1.4em; background: none; border: none;
  color: #fff; font-size: 1.4em; cursor: pointer;
}
.estadisticas-titulo {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 1em;
  color: #30c7ff;
  letter-spacing: .01em;
}
.estadisticas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8em 2em;
}
.estadisticas-grid > div {
  margin-bottom: .5em;
  font-size: 1.05em;
  color: #e1e9f5;
}
.estadisticas-grid b {
  color: #b4cfff;
  font-weight: 500;
}
.loading { color: #39d2ff; text-align: center; font-size: 1.1em;}
.cw-btn-accion {
  margin-left: auto;
  background: #232d38;
  border: none;
  border-radius: 50%;
  width: 2.4em;
  height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
  outline: none;
}
.cw-btn-accion svg {
  display: block;
}
.cw-btn-accion:active,
.cw-btn-accion:hover {
  background: #182d22;
}
.estadisticas-popup-grid {
  display: flex;
  gap: 2.5em;
  margin-top: 1.3em;
  margin-bottom: 1.2em;
}
.estadisticas-popup-grid .col {
  flex: 1 1 0;
  min-width: 150px;
}
.dato {
  margin-bottom: 1em;
}
.dato-titulo {
  color: #b3bed6;
  font-size: 1.06em;
  font-weight: 500;
  letter-spacing: .01em;
  margin-bottom: .1em;
}
.dato-valor {
  color: #fff;
  font-size: 1.22em;
  font-weight: 600;
  letter-spacing: .02em;
}
.cambio-24h {
  font-size: 1em;
  font-weight: 700;
  margin-left: .6em;
}
@media (max-width: 700px) {
  .estadisticas-popup-grid { flex-direction: column; gap: 1.6em;}
  .estadisticas-popup-grid .col { min-width: unset; }
}
.dato-valor { 
  font-size: 1.25em; 
  font-weight: 700; 
}
.popup-grid-estadisticas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.1em;
  margin-bottom: 0.2em;
}
.popup-col {
  display: flex;
  flex-direction: column;
  gap: .38em 0;
}
.popup-label {
  color: #a7b3cf;
  font-size: 1em;
  font-weight: 500;
  margin-top: .45em;
  margin-bottom: 0;
  letter-spacing: .01em;
}
.popup-valor {
  color: #f5f8ff;
  font-size: 1.17em;
  font-weight: 700;
  margin-bottom: 0.17em;
  margin-top: 0.06em;
  letter-spacing: .02em;
  line-height: 1.28em;
}
.popup-var {
  font-weight: 600;
  font-size: 0.99em;
  vertical-align: middle;
  margin-left: 0.18em;
}
.estadisticas-titulo {
  color: #36b8ff !important;
  font-size: 1.22em;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 1.1em;
}
.cw-modal-content {
  background: #181e29 !important;
  border-radius: 1.25em;
}
.popup-grid-estadisticas {
  display: flex;
  gap: 2.2em;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1em;
}
.popup-col {
  flex: 1 1 0;
  min-width: 0;
}
.popup-label {
  color: #c7d6f7;
  font-size: .67em;
  margin-bottom: 2px;
  font-weight: 400;
  line-height: 1.2;
}
.popup-valor {
  color: #fff;
  font-size: 1.13em;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.25;
}
.popup-var {
  font-size: .99em;
  margin-left: .55em;
}
.popup-grid-reordenado {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1em 2em;
  margin-top: 1.1em;
  margin-bottom: 0.2em;
}
.popup-col {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.popup-label {
  color: #c7d6f7;
  font-size: 0.57em;
  font-weight: 500;
  margin-bottom: 1.5px;
  line-height: 1.1;
}
.popup-valor {
  font-size: 1.13em;
  color: #fff;
  font-weight: 500;
  margin-bottom: 1.16em;
}
.popup-var {
  font-size: .97em;
  font-weight: 600;
  margin-left: .5em;
}
.popup-separador {
  border-bottom: 1px solid #263045;
  margin-bottom: 1.1em;
}
.estadisticas-titulo {
  color: #36b8ff;
  font-size: 1.19em;
  font-weight: 700;
  letter-spacing: .02em;
}
.popup-grid-cripto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1em 2.2em;
  margin-bottom: .2em;
}
.popup-label {
  color: #c7d6f7;
  font-size: .87em;
  margin-bottom: 2.2px;
  font-weight: 500;
  line-height: 1.1;
}
.popup-valor {
  font-size: .97em;
  color: #fff;
  font-weight: 500;
  margin-bottom: 0.67em;
  line-height: 1.16;
}
.popup-var {
  font-size: .98em;
  font-weight: 600;
  margin-left: .46em;
}
.popup-separador {
  border-bottom: 1.3px solid #263045;
  width: 100%;
  margin: 1em 0 1.2em 0;
}
.estadisticas-titulo {
  color: #36b8ff;
  font-size: 1.08em;
  font-weight: 700;
  letter-spacing: .02em;
}
/* CARD DE MERCADO (CryptoWise Pro) */

/* ==== CONTENEDOR DEL CARD DE MERCADOS ==== */
.card-mercado {
  background: #1b2130;                     /* Fondo oscuro del card (estilo CryptoWise) */
  border-radius: 30px;                       /* Bordes redondeados en todo el bloque */
  padding: 32px 30px 18px 30px;              /* Espaciado interno: top, right, bottom, left */
  box-shadow: 0 6px 32px #181e2b55;        /* Sombra suave para efecto de elevación */
  margin-top: 0px !important;                /* Espacio por encima del card */
  margin-bottom: 0px;                        /* Sin espacio por debajo (ajústalo si hay separación extra) */
}

/* ==== CONTENEDOR DE LAS PESTAÑAS (Populares, Cartera CW, etc.) ==== */
.market-tabs {
  display: flex;                           /* Muestra las pestañas en fila horizontal */
  gap: 16px;                               /* Separación horizontal entre pestañas */
  margin-bottom: 20px;                     /* Espacio entre las pestañas y la tabla de mercado */
}


/* ==== ESTILO BASE DE PESTAÑAS DE MERCADO ==== */
.market-tab {
  background: transparent;                  /* Sin fondo por defecto */
  border: none;                             /* Sin bordes visibles */
  color: #b8cdf9;                           /* Color de texto por defecto */
  font-size: 0.94em;                        /* Tamaño de fuente ajustado */
  font-weight: 500;                         /* Grosor medio del texto */
  padding: 8px 22px;                        /* Espaciado interno (vertical / horizontal) */
  border-radius: 20px;                      /* Bordes redondeados tipo pastilla */
  cursor: pointer;                          /* Cursor en forma de mano al pasar */
  transition: all 0.18s ease-in-out;        /* Transición suave al interactuar */
}

/* ==== PESTAÑA ACTIVA ==== */
.market-tab.active {
  background: linear-gradient(135deg, #1790e7, #26d3ff);     /* Fondo degradado azul profesional */
  color: #ffffff;                                              /* Texto blanco en estado activo */
  font-weight: 600;                                              /* Texto ligeramente más grueso */
  border-radius: 20px;  
  padding: 7px 16px;                                            /* Bordes redondeados igual que el resto */
  box-shadow: 0 4px 12px rgba(38, 211, 255, 0.15);             /* Sombra suave para efecto de profundidad */
  transform: translateY(0);                                      /* Sin desplazamiento al hacer clic */
}
@media (max-width: 540px) {
  .market-tab.active {
    padding: 5px 16px !important;
    font-size: 0.92rem;
  }
}

/* ==== ESTILO AL PASAR RATÓN (HOVER) ==== */
.market-tab:hover {
  background: linear-gradient(135deg, #1790e7, #26d3ff);  /* Misma sensación de pestaña activa al pasar */
  color: #ffffff;                          /* Texto blanco al hacer hover */
  border-radius: 20px;                     /* Se mantiene redondeado en hover */
}



.market-table-container {
  min-height: 170px;
  margin-bottom: 8px;
}
.market-table {
  width: 100%;
  border-spacing: 0;
  font-size: 0.95em;
  background: none;
}
.market-table th, .market-table td {
  padding: 9px 0;
  border: none;
}
.market-table th {
  color: #b8cdf9;
  font-weight: 600;
  font-size: 1.02em;
  border-bottom: 1.7px solid #23304a;
}
.market-table td {
  color: #fff;
  font-weight: 500;
  border-bottom: 1px solid #212a39;
  font-size: 1.06em;
}
.market-table tr:last-child td {
  border-bottom: none;
}
.market-table .crypto-symbol {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
  font-size: 0.97em;
  letter-spacing: .01em;
}
.market-table .crypto-logo-market {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: #172029;
  box-shadow: 0 1px 5px #202c39cc;
}

.market-table .change-pos {
  color: #17f27c;
  background: #182b27bb;
  border-radius: 9px;
  font-weight: 700;
  padding: 2px 11px;
  font-size: 0.99em;
  margin-left: 7px;
}
.market-table .change-neg {
  color: #ff6268;
  background: #291e22;
  border-radius: 9px;
  font-weight: 700;
  padding: 2px 11px;
  font-size: 0.99em;
  margin-left: 7px;
}
.market-vermas {
  text-align: center; margin-top: 8px;
}
.btn-outline-market {
  border: 1.3px solid #30caff;
  background: none;
  color: #30caff;
  border-radius: 10px;
  padding: 7px 28px;
  font-weight: 700;
  font-size: 0.96em;
  cursor: pointer;
  margin: 0 auto;
  transition: background 0.14s, color 0.11s;
}
.btn-outline-market:hover {
  background: #22b6ee33;
  color: #fff;
}
.cw-modal-overlay {
  position:fixed;top:0;left:0;width:100vw;height:100vh;
  background:rgba(7,12,23,0.72);
  display:flex;align-items:center;justify-content:center;
  z-index:99999;
}
.cw-modal-content {
  position:relative;
  background:#171b23;
  border-radius:28px;
  padding:24px 20px;
  box-shadow:0 12px 60px #031a48ab;
  min-width:340px;
  min-height:140px;
}
.btn-outline-market {
  border:1.7px solid #3ac2ff;
  border-radius:12px;
  padding:6px 22px;
  color:#61d7ff;
  background:transparent;
  font-size:1.02em;
  font-weight:600;
  cursor:pointer;
  margin-top:0;
  transition:.18s;
}
.btn-outline-market:hover { background:#093b54; color:#fff; border-color:#41e9ff;}
.cw-modal-close { color:#ff5e77;font-size:1.7em;cursor:pointer; }
#market-chart-box {
  width: 100%;
  min-height: 300px;
  height: 340px;
  max-width: 100vw;
  margin: 0 auto;
  position: relative;
  /* Si quieres puedes poner background temporal para debug: */
  /* background: #1b2333; */
  padding-right: 0 !important;  /* <-- Añade esta línea */
  padding-left: 0 !important;   /* <-- Y esta */
}
@media (max-width: 600px) {
  #market-chart-box {
    min-height: 220px;
    height: 260px;
  }
}
.btn-outline-blue {
  background: transparent;
  border: 2px solid #23aaff;
  color: #23aaff;
  border-radius: 14px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: background .17s, color .13s, border-color .16s;
  outline: none;
  display: inline-block;
}
.btn-outline-blue:hover {
  background: #1b253b;
  color: #fff;
  border-color: #36c3ff;
}
.cw-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(20,25,35,0.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.cw-modal-content {
  background: #232b3a;
  border-radius: 20px;
  padding: 28px;
  max-width: 760px;
  width: 96vw;
  box-shadow: 0 8px 60px #10182777;
  position: relative;
}
.cw-modal-close {
  position: absolute; top: 14px; right: 20px;
  font-size: 2em; cursor: pointer; color: #23aaff;
}
#ganancias-realizadas {
  display: none;
  padding: 20px;
}
#ganancias-realizadas hr {
  border: none;
  border-top: 1px solid #444;
  margin: 25px 0 15px;
}
#ganancias-realizadas h4 {
  color: #f5f5f5;
  font-size: 1.1em;
  margin-bottom: 12px;
}
.solo-portrait-alert {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #232936;
  color: #fff;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  font-size: 1.25em;
  text-align: center;
}
.solo-portrait-alert.activa {
  display: flex !important;
}

