/* ============================================================
   NexoEdu – Frontend CSS
   ============================================================ */

:root {
  --nexo-primary: #6c47ff;
  --nexo-primary-dark: #5535e0;
  --nexo-accent: #9b59b6;
  --nexo-bg: #f4f6fb;
  --nexo-bg-card: #ffffff;
  --nexo-text: #1e1e2e;
  --nexo-muted: #6b7280;
  --nexo-border: #e5e7eb;
  --nexo-success: #16a34a;
  --nexo-error: #dc2626;
  --nexo-radius: 12px;
  --nexo-shadow: 0 2px 16px rgba(0,0,0,.07);
  --nexo-sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.nexo-panel {
  display: flex;
  min-height: 100vh;
  background: var(--nexo-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- SIDEBAR ---- */
.nexo-sidebar {
  width: var(--nexo-sidebar-w);
  background: #1e1e2e;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .3s;
}
.nexo-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nexo-logo-icon { font-size: 24px; }
.nexo-logo-text {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.nexo-sidebar__logo-img {
  max-height: 40px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}
.nexo-sidebar__nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nexo-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.nexo-nav-item:hover, .nexo-nav-item.active {
  background: rgba(108,71,255,.25);
  color: #fff;
}
.nexo-nav-icon { font-size: 16px; }
.nexo-sidebar__footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  position: sticky;
  bottom: 0;
  background: #1e1e2e;
  z-index: 10;
}
.nexo-logout-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 9px;
  border-radius: 8px;
  background: rgba(220, 38, 38, .15);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(220, 38, 38, .25);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.nexo-logout-btn:hover {
  background: rgba(220, 38, 38, .35);
  color: #fff;
}

/* ---- MAIN ---- */
.nexo-main {
  margin-left: var(--nexo-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- TOPBAR ---- */
.nexo-topbar {
  background: var(--nexo-bg-card);
  border-bottom: 1px solid var(--nexo-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nexo-topbar__user { display: flex; align-items: center; gap: 12px; }
.nexo-topbar__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.nexo-topbar__name { font-weight: 600; font-size: 15px; color: var(--nexo-text); }
.nexo-topbar__status { font-size: 12px; }
.nexo-topbar__status.active { color: var(--nexo-success); }
.nexo-topbar__status.inactive { color: var(--nexo-muted); }

/* ---- CONTENT ---- */
.nexo-content { padding: 28px; flex: 1; }
.nexo-section-title { font-size: 22px; font-weight: 700; color: var(--nexo-text); margin-bottom: 20px; }
.nexo-section-subtitle { font-size: 16px; font-weight: 600; margin: 24px 0 12px; }

/* ---- CARDS ---- */
.nexo-card {
  background: var(--nexo-bg-card);
  border-radius: var(--nexo-radius);
  box-shadow: var(--nexo-shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.nexo-card__title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--nexo-text); }

/* ---- STATS GRID ---- */
.nexo-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.nexo-stat-card {
  background: var(--nexo-bg-card);
  border-radius: var(--nexo-radius);
  box-shadow: var(--nexo-shadow);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--nexo-border);
}
.nexo-stat-card--highlight { background: var(--nexo-primary); border-color: var(--nexo-primary); }
.nexo-stat-card--highlight .nexo-stat-value,
.nexo-stat-card--highlight .nexo-stat-label,
.nexo-stat-card--highlight .nexo-stat-icon { color: #fff; }
.nexo-stat-icon { font-size: 24px; margin-bottom: 8px; }
.nexo-stat-value { font-size: 28px; font-weight: 700; color: var(--nexo-text); }
.nexo-stat-label { font-size: 12px; color: var(--nexo-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

/* ---- QUICK ACTIONS ---- */
.nexo-quick-actions h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.nexo-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.nexo-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--nexo-bg-card);
  border: 1px solid var(--nexo-border);
  border-radius: var(--nexo-radius);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--nexo-text);
  font-size: 13px;
  font-weight: 500;
  transition: box-shadow .2s, transform .2s;
}
.nexo-quick-card span { font-size: 28px; }
.nexo-quick-card:hover { box-shadow: var(--nexo-shadow); transform: translateY(-2px); }
.nexo-quick-card--cta { background: var(--nexo-primary); color: #fff; border-color: var(--nexo-primary); }

/* ---- BUTTONS ---- */
.nexo-btn-primary {
  display: inline-block;
  background: var(--nexo-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .1s;
  line-height: 1.4;
}
.nexo-btn-primary:hover { background: var(--nexo-primary-dark); color: #fff; }
.nexo-btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--nexo-primary);
  border: 2px solid var(--nexo-primary);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.nexo-btn-outline:hover { background: var(--nexo-primary); color: #fff; }
.nexo-btn-ghost {
  display: inline-block;
  background: #f3f4f6;
  color: var(--nexo-muted);
  border: 1px solid var(--nexo-border);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.nexo-btn-sm { padding: 7px 14px; font-size: 13px; }
.nexo-btn-lg { padding: 13px 28px; font-size: 16px; }
.nexo-btn-full { width: 100%; text-align: center; }

/* ---- COURSES GRID ---- */
.nexo-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.nexo-courses-grid--locked { opacity: .75; }
.nexo-course-card {
  background: var(--nexo-bg-card);
  border-radius: var(--nexo-radius);
  box-shadow: var(--nexo-shadow);
  overflow: hidden;
  border: 1px solid var(--nexo-border);
  transition: transform .2s, box-shadow .2s;
}
.nexo-course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.nexo-course-card__thumb {
  position: relative;
  height: 150px;
  background: #e5e7eb;
  overflow: hidden;
}
.nexo-course-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.nexo-course-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.nexo-course-card__lock {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,.6);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 16px;
}
.nexo-course-card__body { padding: 16px; }
.nexo-course-card__body h4 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--nexo-text); line-height: 1.3; }
.nexo-course-card__instructor { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; font-size: 12px; color: var(--nexo-muted); }
.nexo-course-card__instructor img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* ---- LOCKED NOTICE ---- */
.nexo-locked-notice {
  text-align: center;
  padding: 40px 20px;
  background: var(--nexo-bg-card);
  border-radius: var(--nexo-radius);
  border: 2px dashed var(--nexo-border);
  margin-bottom: 24px;
}
.nexo-locked-icon { font-size: 48px; margin-bottom: 12px; }
.nexo-locked-notice h3 { font-size: 20px; margin-bottom: 8px; }
.nexo-locked-notice p { color: var(--nexo-muted); margin-bottom: 20px; }

/* ---- COURSE DETAIL ---- */
.nexo-course-detail { }
.nexo-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--nexo-primary); text-decoration: none; font-size: 14px; margin-bottom: 20px; font-weight: 500; }
.nexo-course-header { background: var(--nexo-bg-card); border-radius: var(--nexo-radius); overflow: hidden; margin-bottom: 20px; }
.nexo-course-banner {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: var(--nexo-radius) var(--nexo-radius) 0 0;
}
.nexo-course-header {
  max-width: 500px;
}

@media (max-width: 768px) {
  .nexo-course-banner {
    height: 160px;
  }
}
.nexo-course-meta { padding: 20px; }
.nexo-course-meta h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.nexo-instructor-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.nexo-instructor-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ---- SHARE BOX ---- */
.nexo-share-box {
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: var(--nexo-radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
}
.nexo-share-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--nexo-border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: var(--nexo-text);
}

/* ---- LESSONS ---- */
.nexo-lessons-list { display: flex; flex-direction: column; gap: 12px; }
.nexo-lesson-item { display: flex; gap: 14px; background: #f9fafb; border-radius: 8px; padding: 16px; border: 1px solid var(--nexo-border); }
.nexo-lesson-num { min-width: 28px; height: 28px; background: var(--nexo-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.nexo-lesson-info { flex: 1; }
.nexo-lesson-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.nexo-lesson-video-wrap { margin-top: 8px; }
.nexo-lesson-video-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  padding-top: min(360px, 56.25%);
  margin-top: 10px;
}
.nexo-video-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .nexo-lesson-video-wrap {
    max-width: 100%;
    padding-top: 56.25%;
  }
}

/* ---- REFERIDOS TAB ---- */
.nexo-info-box { display: flex; align-items: center; gap: 10px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }
.nexo-info-label { color: var(--nexo-muted); }
.nexo-ref-link-box { background: var(--nexo-bg-card); border-radius: var(--nexo-radius); box-shadow: var(--nexo-shadow); padding: 24px; margin-bottom: 20px; }
.nexo-ref-link-box h3 { margin-bottom: 8px; font-size: 16px; }
.nexo-ref-link-box p { color: var(--nexo-muted); font-size: 14px; margin-bottom: 14px; }
.nexo-link-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nexo-share-social { display: flex; gap: 8px; margin-top: 12px; }
.nexo-share-wa { background: #25d366; color: #fff; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 600; }
.nexo-share-fb { background: #1877f2; color: #fff; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 600; }
.nexo-share-tw { background: #1da1f2; color: #fff; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 600; }
.nexo-how-works { background: var(--nexo-bg-card); border-radius: var(--nexo-radius); padding: 24px; }
.nexo-how-works h3 { margin-bottom: 16px; }
.nexo-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.nexo-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.nexo-step-num { width: 36px; height: 36px; background: var(--nexo-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nexo-step p { font-size: 13px; color: var(--nexo-muted); }

/* ---- PERFIL ---- */
.nexo-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nexo-form { display: flex; flex-direction: column; gap: 16px; }
.nexo-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nexo-form-group { display: flex; flex-direction: column; gap: 6px; }
.nexo-form-avatar-row { display: flex; align-items: flex-end; gap: 16px; }
.nexo-avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--nexo-border); flex-shrink: 0; }
.nexo-label { font-size: 13px; font-weight: 600; color: var(--nexo-text); }
.nexo-input {
  padding: 9px 13px;
  border: 1.5px solid var(--nexo-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--nexo-text);
  background: #fff;
  transition: border-color .2s;
  width: 100%;
}
.nexo-input:focus { outline: none; border-color: var(--nexo-primary); }
.nexo-hint { font-size: 12px; color: var(--nexo-muted); }
.nexo-form-msg { font-size: 13px; min-height: 18px; }
.nexo-form-msg.success { color: var(--nexo-success); }
.nexo-form-msg.error { color: var(--nexo-error); }
.nexo-membership-status { padding: 16px; border-radius: 8px; }
.nexo-membership-status.active { background: #f0fdf4; border: 1px solid #bbf7d0; }
.nexo-membership-status.inactive { background: #fef9f0; border: 1px solid #fde68a; }
.nexo-membership-badge { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.nexo-membership-status p { font-size: 14px; margin-bottom: 12px; }

/* ---- AUTH ---- */
.nexo-auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 40px 16px; }
.nexo-auth-card { background: var(--nexo-bg-card); border-radius: 16px; box-shadow: 0 4px 32px rgba(0,0,0,.1); padding: 40px 36px; width: 100%; max-width: 420px; }
.nexo-auth-logo { font-size: 40px; text-align: center; margin-bottom: 12px; }
.nexo-auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.nexo-auth-sub { text-align: center; color: var(--nexo-muted); font-size: 14px; margin-bottom: 28px; }
.nexo-auth-footer { text-align: center; font-size: 14px; color: var(--nexo-muted); margin-top: 20px; }
.nexo-auth-footer a { color: var(--nexo-primary); text-decoration: none; font-weight: 600; }
.nexo-form-remember { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.nexo-forgot { color: var(--nexo-primary); text-decoration: none; }

/* ---- HOME ---- */
.nexo-home { }
.nexo-hero { background: linear-gradient(135deg, #1e1e2e 0%, #2d1b69 100%); padding: 80px 40px; display: flex; align-items: center; gap: 60px; flex-wrap: wrap; }
.nexo-hero__content { flex: 1; min-width: 280px; }
.nexo-hero__title { font-size: 48px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 16px; }
.nexo-hero__title span { color: #a78bfa; }
.nexo-hero__sub { color: rgba(255,255,255,.75); font-size: 18px; margin-bottom: 28px; line-height: 1.6; }
.nexo-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.nexo-hero__visual { flex: 1; min-width: 240px; display: flex; justify-content: center; }
.nexo-hero__mockup { background: rgba(255,255,255,.08); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.15); }
.nexo-mockup-stat { background: rgba(255,255,255,.12); padding: 14px 24px; border-radius: 10px; color: #fff; font-weight: 600; text-align: center; }
.nexo-benefits { padding: 64px 40px; background: var(--nexo-bg); }
.nexo-benefits__title { text-align: center; font-size: 32px; font-weight: 700; margin-bottom: 40px; }
.nexo-benefits__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.nexo-benefit-card { background: var(--nexo-bg-card); border-radius: var(--nexo-radius); padding: 28px; text-align: center; box-shadow: var(--nexo-shadow); }
.nexo-benefit-icon { font-size: 40px; margin-bottom: 14px; }
.nexo-benefit-card h3 { font-size: 17px; margin-bottom: 8px; }
.nexo-benefit-card p { color: var(--nexo-muted); font-size: 14px; line-height: 1.6; }
.nexo-cta { background: linear-gradient(135deg, var(--nexo-primary), var(--nexo-accent)); padding: 64px 40px; text-align: center; }
.nexo-cta h2 { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.nexo-cta p { color: rgba(255,255,255,.8); font-size: 17px; margin-bottom: 28px; }
.nexo-cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- COURSE PAGE ---- */
.nexo-course-page { }
.nexo-course-page__header {
  height: 340px;
  max-height: 340px;
  background: #1e1e2e;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.nexo-course-page__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.75)); padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; }
.nexo-course-page__overlay h1 { color: #fff; font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.nexo-back-link--white { color: rgba(255,255,255,.8); margin-bottom: 20px; }
.nexo-back-link--white:hover { color: #fff; }
.nexo-instructor-row--white { color: rgba(255,255,255,.85); }
.nexo-course-page__body { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 28px; max-width: 1200px; margin: 0 auto; }
.nexo-course-page__main { }
.nexo-course-page__sidebar { }
.nexo-share-sidebar { position: sticky; top: 80px; }

/* ---- NOTICES ---- */
.nexo-notice { padding: 12px 16px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; font-size: 14px; }
.nexo-empty { color: var(--nexo-muted); font-size: 14px; padding: 20px; text-align: center; }

.nexo-ref-notice {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 4px;
}

/* ---- HAMBURGER ---- */
.nexo-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-right: 10px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background .2s;
}
.nexo-hamburger:hover { background: rgba(0,0,0,.06); }
.nexo-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nexo-text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* ---- SIDEBAR OVERLAY (móvil) ---- */
.nexo-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.nexo-sidebar-overlay.visible { display: block; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .nexo-hamburger { display: flex; }

  .nexo-sidebar {
    transform: translateX(-100%);
    width: 260px;
    transition: transform .28s ease;
  }
  .nexo-sidebar.open { transform: translateX(0); }

  .nexo-main { margin-left: 0; }
  .nexo-topbar { padding: 12px 16px; }
  .nexo-topbar__cta { font-size: 12px; padding: 6px 10px; }
  .nexo-content { padding: 16px; }
  .nexo-profile-grid { grid-template-columns: 1fr; }
  .nexo-form-row { grid-template-columns: 1fr; }
  .nexo-stats-grid { grid-template-columns: 1fr 1fr; }
  .nexo-hero { padding: 48px 24px; flex-direction: column; }
  .nexo-hero__title { font-size: 30px; }
  .nexo-hero__visual { display: none; }
  .nexo-benefits { padding: 48px 24px; }
  .nexo-cta { padding: 48px 24px; }
  .nexo-course-page__body { grid-template-columns: 1fr; padding: 16px; }
 .nexo-video-embed { height: 100%; }
  .nexo-quick-grid { grid-template-columns: 1fr 1fr; }
  .nexo-steps { grid-template-columns: 1fr 1fr; }
  .nexo-auth-card { padding: 28px 20px; }
  .nexo-link-row { flex-direction: column; }
}

/* ---- AVATAR UPLOAD ---- */
.nexo-avatar-upload-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.nexo-avatar-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--nexo-primary);
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  line-height: 1;
}
.nexo-progress-bar-wrap {
  background: #e5e7eb;
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}
.nexo-progress-bar-fill {
  background: var(--nexo-primary);
  height: 100%;
  width: 0%;
  transition: width .3s ease;
}



/* ---- RETIROS ---- */
.nexo-retiro-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.nexo-retiro-dato {
  background: #f9fafb;
  border: 1px solid var(--nexo-border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.nexo-retiro-label {
  display: block;
  font-size: 11px;
  color: var(--nexo-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.nexo-retiro-valor {
  font-size: 22px;
  font-weight: 700;
  color: var(--nexo-text);
}
.nexo-retiros-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.nexo-retiros-table th {
  background: #f9fafb;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--nexo-border);
}
.nexo-retiros-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}


/* ---- REFERIDO BLOQUEADO ---- */
.nexo-ref-locked {
  background: var(--nexo-bg-card);
  border: 2px dashed var(--nexo-border);
  border-radius: var(--nexo-radius);
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 20px;
}
.nexo-ref-locked__icon { font-size: 40px; margin-bottom: 12px; }
.nexo-ref-locked h3 { font-size: 18px; margin-bottom: 8px; }
.nexo-ref-locked p { color: var(--nexo-muted); font-size: 14px; margin-bottom: 16px; }
.nexo-ref-locked small { color: var(--nexo-muted); font-size: 12px; }
.nexo-ref-locked__progress {
  background: #e5e7eb;
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  max-width: 260px;
  margin: 0 auto 8px;
}
.nexo-ref-locked__bar {
  background: var(--nexo-primary);
  height: 100%;
  border-radius: 99px;
  transition: width .3s;
}



.nexo-nav-separator {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 8px 12px;
}


/* ---- BANNER BIENVENIDA ---- */
.nexo-welcome-banner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, #6c47ff11, #9b59b611);
  border: 1px solid #6c47ff33;
  border-radius: var(--nexo-radius);
  padding: 24px;
  margin-bottom: 28px;
}
.nexo-welcome-banner__icon { font-size: 40px; flex-shrink: 0; }
.nexo-welcome-banner__content h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.nexo-welcome-banner__content p  { font-size: 14px; color: var(--nexo-muted); margin: 0; }

/* ---- GANANCIAS INTRO ---- */
.nexo-ganancias-intro {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--nexo-text);
}
.nexo-ganancias-intro p { margin: 0; line-height: 1.6; }


/* ---- STATS PEQUEÑAS ---- */
.nexo-stats-grid--small {
  grid-template-columns: repeat(4, 1fr);
}
.nexo-stats-grid--small .nexo-stat-card {
  padding: 14px 12px;
}
.nexo-stats-grid--small .nexo-stat-icon {
  font-size: 16px;
  margin-bottom: 4px;
}
.nexo-stats-grid--small .nexo-stat-value {
  font-size: 20px;
}
.nexo-stats-grid--small .nexo-stat-label {
  font-size: 10px;
}

@media (max-width: 768px) {
  .nexo-stats-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }
  .nexo-stats-grid--small .nexo-stat-card {
    padding: 10px 8px;
  }
  .nexo-stats-grid--small .nexo-stat-value {
    font-size: 16px;
  }
  .nexo-stats-grid--small .nexo-stat-icon {
    font-size: 14px;
  }
  .nexo-stats-grid--small .nexo-stat-label {
    font-size: 9px;
  }
}





/* ---- SUSCRIPCIÓN TAB ---- */
.nexo-sub-card { text-align: center; }
.nexo-sub-empty { padding: 20px 0; }
.nexo-sub-empty h3 { font-size: 20px; margin-bottom: 10px; }
.nexo-sub-empty p { color: var(--nexo-muted); margin-bottom: 20px; font-size: 15px; }

.nexo-sub-pricing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.nexo-sub-pricing__item { text-align: center; }
.nexo-sub-pricing__label {
  display: block;
  font-size: 11px;
  color: var(--nexo-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.nexo-sub-pricing__amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--nexo-primary);
}
.nexo-sub-pricing__sep { font-size: 24px; color: var(--nexo-muted); }

.nexo-sub-includes {
  list-style: none;
  text-align: left;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nexo-sub-includes li { font-size: 14px; color: var(--nexo-text); }

.nexo-sub-status-card { transition: none; }
.nexo-sub-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.nexo-sub-status-badge { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.nexo-sub-status-meta { font-size: 13px; color: var(--nexo-muted); }
.nexo-sub-status-id { font-size: 13px; color: var(--nexo-muted); }

.nexo-sub-dates {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.nexo-sub-date-item { display: flex; flex-direction: column; gap: 3px; }
.nexo-sub-date-label { font-size: 11px; color: var(--nexo-muted); text-transform: uppercase; letter-spacing: .5px; }
.nexo-sub-date-val { font-size: 15px; font-weight: 600; color: var(--nexo-text); }

.nexo-sub-actions { display: flex; flex-direction: column; gap: 0; }
.nexo-sub-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--nexo-border);
  flex-wrap: wrap;
}
.nexo-sub-action-item:last-child { border-bottom: none; }
.nexo-sub-action-item strong { font-size: 14px; display: block; margin-bottom: 3px; }
.nexo-sub-action-item p { font-size: 13px; color: var(--nexo-muted); margin: 0; }
.nexo-sub-action-item--danger strong { color: var(--nexo-error); }

.nexo-btn-danger {
  color: var(--nexo-error) !important;
  border-color: var(--nexo-error) !important;
}
.nexo-btn-danger:hover {
  background: var(--nexo-error) !important;
  color: #fff !important;
}

.nexo-sub-history {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.nexo-sub-history th {
  background: #f9fafb;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--nexo-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--nexo-muted);
}
.nexo-sub-history td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
}

@media (max-width: 768px) {
  .nexo-sub-action-item { flex-direction: column; align-items: flex-start; }
  .nexo-sub-status-row { flex-direction: column; align-items: flex-start; }
  .nexo-sub-dates { flex-direction: column; gap: 12px; }
}



.nexo-sub-al-dia {
  font-size: 13px;
  font-weight: 600;
  color: var(--nexo-success);
  white-space: nowrap;
}


