/* ============================================================
   PERFIL — cabecera, pestañas y bloques.
   Se carga DESPUÉS de users/index.css y reestiliza la página.
   Todo sobre tokens de tokens.css: nada de colores fijos.
   ============================================================ */

.profile-page { background: var(--bg); padding: 0 0 var(--space-16); }
.profile-page .profile-cover { display: none; }
.pf-shell { max-width: var(--container, 1200px); margin: 0 auto; padding: var(--space-6) var(--space-6) 0; }

/* ===== BOTONES (locales al perfil) ===== */
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 10px 18px;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  border-radius: var(--radius-btn); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.pf-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.pf-btn--primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-accent-sm); }
.pf-btn--primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }
.pf-btn--ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--border-strong); }
.pf-btn--ghost:hover { border-color: var(--accent-border); color: var(--accent); background: var(--surface-2); }
.pf-btn--sm { padding: 7px 13px; font-size: var(--fs-xs); }
.pf-btn--sm svg { width: 13px; height: 13px; }
.pf-btn.is-copied { color: var(--success); border-color: var(--success-border); }
.pf-btn:active { transform: translateY(1px); }

/* ===== CABECERA ===== */
.pf-hero {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
}

/* Banda de marca: las 5 barras del isotipo, una vez y en pequeño. Sustituye
   al degradado morado→cian, que era lo más llamativo de toda la página. */
.pf-hero__band {
  height: 96px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end;
  padding-inline-end: var(--space-8);
}
.pf-hero__bars { width: 132px; height: 44px; color: var(--accent); opacity: .16; }
.pf-hero__bars rect { fill: currentColor; }

.pf-hero__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: start;
  padding: 0 var(--space-8) var(--space-7);
}

.profile-page .pf-hero__avatar {
  width: 116px; height: 116px; border-radius: 50%;
  border: 5px solid var(--surface); margin-top: -58px;
  flex-shrink: 0; overflow: hidden;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: var(--shadow-md); position: relative; z-index: 1;
}
.profile-page .pf-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-page .profile-header-initials { color: var(--accent-contrast); font-weight: 800; font-size: 38px; font-family: var(--font-display); }

.pf-hero__main { padding-top: var(--space-5); min-width: 0; }
.pf-hero__name {
  font-family: var(--font-display); font-size: var(--fs-display-md, 28px);
  font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  display: flex; align-items: center; gap: var(--space-2); line-height: 1.15;
}
.pf-hero__handle { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-1); }
.pf-hero__at { font-size: var(--fs-sm); color: var(--ink-faint); }

.pf-rank {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .03em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 3px 10px; border-radius: var(--radius-pill); text-decoration: none;
}
a.pf-rank:hover { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.pf-rank svg { width: 12px; height: 12px; }

.pf-hero__headline {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  font-size: var(--fs-md); font-weight: 600; color: var(--ink);
  margin-top: var(--space-3);
}
.pf-hero__place { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--ink-soft); }
.pf-hero__place svg { width: 14px; height: 14px; }
.pf-hero__dot { color: var(--ink-faint); }
.pf-hero__headline--todo { font-weight: 500; }
.pf-hero__headline--todo a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent-border); }
.pf-hero__headline--todo a:hover { border-bottom-color: var(--accent); }

.pf-hero__bio { color: var(--ink-soft); font-size: var(--fs-sm); margin-top: var(--space-3); max-width: 62ch; line-height: var(--lh-relaxed, 1.6); }

/* Cifras: mono tabular, como en comparador y formación. */
.pf-hero__stats { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-5); margin-top: var(--space-5); }
.pf-stat { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.pf-stat__n { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.pf-stat__l { font-size: var(--fs-xs); color: var(--ink-faint); }
.pf-stat--link:hover .pf-stat__n { color: var(--accent); }
.pf-stat--link:hover .pf-stat__l { color: var(--ink-soft); }

.pf-hero__actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); padding-top: var(--space-5); }
.pf-hero__btns { display: flex; gap: var(--space-2); }
.profile-page .pf-hero__social { display: flex; gap: var(--space-2); }
.profile-page .profile-social-link { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--ink-faint); transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.profile-page .profile-social-link:hover { border-color: var(--accent-border); color: var(--accent); }
.profile-page .profile-social-link svg { width: 16px; height: 16px; }

/* El botón de seguir conserva su clase (la usa el JS) y adopta el estilo nuevo. */
.profile-page .profile-follow-btn.pf-btn--primary.is-following { background: var(--surface); color: var(--ink-soft); border-color: var(--border-strong); box-shadow: none; }

/* badges verificado / email */
.profile-page .profile-badge { position: relative; display: inline-flex; }
.profile-page .profile-badge--verified { color: var(--accent); }
.profile-page .profile-badge--email { color: var(--success); }
.profile-page .profile-badge svg { width: 20px; height: 20px; }
.profile-page .profile-badge__tooltip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: var(--fs-2xs); font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out); z-index: 2; }
.profile-page .profile-badge:hover .profile-badge__tooltip { opacity: 1; }

/* ===== PESTAÑAS ===== */
.pf-tabs {
  position: sticky; top: var(--header-h); z-index: var(--z-sticky, 50);
  display: flex; gap: var(--space-1);
  background: var(--bg); border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5); overflow-x: auto; scrollbar-width: none;
}
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
  position: relative; flex-shrink: 0;
  padding: var(--space-4) var(--space-4);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-faint); background: none; border: none; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.pf-tab:hover { color: var(--ink); }
.pf-tab::after {
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform var(--dur-base) var(--ease-out);
}
.pf-tab[aria-selected="true"] { color: var(--accent); }
.pf-tab[aria-selected="true"]::after { transform: scaleX(1); }

/* El panel activo lo marca el servidor con hidden, así no hay salto al
   arrancar el JS. Sin JS, el <noscript> de la plantilla revierte esta regla y
   deja los tres paneles apilados. */
.pf-panel { display: flex; flex-direction: column; gap: var(--space-5); }
.pf-panel[hidden] { display: none; }

/* ===== BLOQUES ===== */
.pf-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}
.pf-block__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.pf-block__title {
  font-family: var(--font-display); font-size: var(--fs-lg, 17px); font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: var(--space-2); padding-bottom: 0;
}
.pf-block__title::after { display: none; }
.pf-block__title svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.pf-block__n {
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-faint);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 8px; border-radius: var(--radius-pill);
}
.pf-block--rank { padding: 0; border: none; box-shadow: none; background: none; }

/* ===== ESTADO VACÍO ===== */
.pf-empty {
  text-align: center; padding: var(--space-8) var(--space-5);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.pf-empty__ic {
  display: grid; place-items: center; width: 46px; height: 46px;
  margin: 0 auto var(--space-4); border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
}
.pf-empty__ic svg { width: 23px; height: 23px; }
.pf-empty__txt { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0 auto; max-width: 46ch; line-height: 1.55; }
.pf-empty__actions { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-5); flex-wrap: wrap; }
.pf-empty__alt { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-faint); text-decoration: none; }
.pf-empty__alt:hover { color: var(--accent); }
.profile-page .profile-empty-text { font-size: var(--fs-sm); color: var(--ink-faint); }

/* ===== PERSONAS QUE SEGUIR / ALTA ===== */
.pf-people { margin-top: var(--space-5); }
.profile-page .pf-people .profile-community-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-4); }

.pf-join {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-6); flex-wrap: wrap; margin-top: var(--space-5);
  padding: var(--space-7) var(--space-8);
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  border-radius: var(--radius-card);
}
.pf-join__txt { min-width: 0; }
.pf-join__txt h2 { font-family: var(--font-display); font-size: var(--fs-xl, 20px); font-weight: 700; color: var(--ink); }
.pf-join__txt p { font-size: var(--fs-sm); color: var(--ink-soft); margin-top: var(--space-2); max-width: 56ch; line-height: 1.55; }
.pf-join__btns { display: flex; gap: var(--space-3); flex-shrink: 0; }

/* ===== progreso por área ===== */
.profile-page .profile-progress-list { list-style: none; margin: 0; padding: 0; }
.profile-page .profile-progress-item { padding: 14px 0; border: none; border-radius: 0; border-bottom: 1px solid var(--border); background: none; }
.profile-page .profile-progress-item:hover { border-color: transparent; border-bottom-color: var(--border); }
.profile-page .profile-progress-item:first-child { padding-top: 0; }
.profile-page .profile-progress-item:last-child { border-bottom: none; padding-bottom: 0; }
.profile-page .profile-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.profile-page .profile-progress-area-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.profile-page .profile-progress-percentage { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--accent); }
.profile-page .profile-progress-bar { height: 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.profile-page .profile-progress-bar-fill { height: 100%; width: var(--progress, 0%); border-radius: 99px; background: var(--accent); }
.profile-page .profile-progress-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--ink-faint); }
.profile-page .profile-progress-score { color: var(--success); font-weight: 600; }


/* ===== etiquetas seguidas ===== */
.profile-page .profile-tags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-page .profile-tag-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 6px 4px 11px; border-radius: 8px; }
.profile-page .profile-tag-chip:hover { border-color: var(--accent-border); }
.profile-page .profile-tag-chip__link { color: var(--ink-soft); text-decoration: none; }
.profile-page .profile-tag-chip:hover .profile-tag-chip__link { color: var(--accent); }
.profile-page .profile-tag-chip__unfollow { display: grid; place-items: center; width: 18px; height: 18px; border: none; background: none; color: var(--ink-faint); cursor: pointer; border-radius: 5px; }
.profile-page .profile-tag-chip__unfollow:hover { color: var(--danger); background: var(--danger-soft); }
.profile-page .profile-tag-chip__unfollow svg { width: 10px; height: 10px; }

/* ===== comunidad ===== */
.profile-page .profile-community-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.profile-page .profile-community-item { display: flex; align-items: center; gap: 11px; }
.profile-page .profile-community-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--accent); display: grid; place-items: center; color: var(--accent-contrast); font-weight: 700; font-size: 13px; }
.profile-page .profile-community-info { flex: 1; min-width: 0; }
.profile-page .profile-community-name { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; min-width: 0; }
.profile-page .profile-community-name > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-page .profile-community-name:hover { color: var(--accent); }
.profile-page .profile-community-username { display: block; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-page .profile-community-follow-btn { flex-shrink: 0; margin-top: 0; padding: 6px 12px; font-size: 12.5px; }
.profile-page .profile-community-follow-btn svg { width: 12px; height: 12px; }

/* Ya seguido: --accent-soft como color de ESTADO, que es para lo que existe.
   El botón fantasma en reposo ya es superficie + tinta suave, así que sin esto
   «Seguir» y «Siguiendo» se verían igual. */
.profile-page .profile-community-follow-btn.is-following {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}


/* ===== experiencia / educación ===== */
.profile-page .profile-company-list, .profile-page .profile-edu-list { list-style: none; margin: 0; padding: 0; }
.profile-page .profile-company-group, .profile-page .profile-edu-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.profile-page .profile-company-group:first-child, .profile-page .profile-edu-item:first-child { padding-top: 0; }
.profile-page .profile-company-group:last-child, .profile-page .profile-edu-item:last-child { border-bottom: none; padding-bottom: 0; }
.profile-page .profile-exp-row { display: flex; gap: 14px; }
.profile-page .profile-company-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink-faint); flex-shrink: 0; overflow: hidden; }
.profile-page .profile-company-logo img { width: 100%; height: 100%; object-fit: contain; }
.profile-page .profile-company-logo svg { width: 22px; height: 22px; }
.profile-page .profile-exp-content { flex: 1; min-width: 0; }
.profile-page .profile-company-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 4px; }
.profile-page .profile-roles-list { list-style: none; margin: 0; padding: 0; }
.profile-page .profile-roles-list--multi { border-left: 2px solid var(--border); padding-left: 14px; margin-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.profile-page .profile-timeline-header { display: flex; justify-content: space-between; gap: 10px; }
.profile-page .profile-timeline-title { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.profile-page .profile-roles-list--multi .profile-timeline-title { font-size: 14px; }
.profile-page .profile-timeline-subtitle { display: block; font-size: 13px; color: var(--ink-soft); }
.profile-page .profile-timeline-dates { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 1px; }
.profile-page .profile-timeline-dates strong { color: var(--accent); font-weight: 600; }
.profile-page .profile-timeline-description { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.55; }
.profile-page .profile-timeline-actions { display: flex; gap: 6px; flex-shrink: 0; }
.profile-page .profile-timeline-btn-edit, .profile-page .profile-timeline-btn-delete { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-faint); display: grid; place-items: center; cursor: pointer; transition: all .18s ease; }
.profile-page .profile-timeline-btn-edit:hover { border-color: var(--accent-border); color: var(--accent); }
.profile-page .profile-timeline-btn-delete:hover { border-color: var(--danger); color: var(--danger); }
.profile-page .profile-timeline-btn-edit svg, .profile-page .profile-timeline-btn-delete svg { width: 14px; height: 14px; }

/* ===== posts ===== */
.profile-page .profile-blog-list { list-style: none; margin: 0; padding: 0; }
.profile-page .profile-blog-li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border: none; border-radius: 0; border-bottom: 1px solid var(--border); background: none; }
.profile-page .profile-blog-li:first-child { padding-top: 0; }
.profile-page .profile-blog-li:last-child { border-bottom: none; padding-bottom: 0; }
.profile-page .profile-blog-li:hover .profile-blog-item-title { color: var(--accent); }
/* index.css le pone borde y fondo propios; aquí la fila ya es la unidad, así
   que se neutraliza para no acabar con una caja dentro de otra. */
.profile-page .profile-blog-item { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; text-decoration: none; border: none; border-radius: 0; padding: 0; background: none; }
.profile-page .profile-blog-item:hover { border: none; background: none; }
.profile-page .profile-blog-item-img-wrap { width: 64px; height: 48px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: var(--photo); }
.profile-page .profile-blog-item-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-page .profile-blog-item-body { min-width: 0; }
.profile-page .blog-post-category { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: none; padding: 0; }
.profile-page .profile-blog-item-title { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 1px; }
.profile-page .profile-blog-item-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.profile-page .blog-post-status--draft { color: var(--warning); font-weight: 600; }
.profile-page .blog-post-sep { opacity: .5; }
.profile-page .profile-blog-edit-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--border-strong); padding: 6px 11px; border-radius: 9px; flex-shrink: 0; text-decoration: none; }
.profile-page .profile-blog-edit-link:hover { border-color: var(--accent-border); color: var(--accent); }
.profile-page .profile-blog-edit-link svg { width: 13px; height: 13px; }

/* ===== posts en tarjetas (perfil editorial) ===== */
.profile-page .profile-posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.profile-page .profile-post-card { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.profile-page .profile-post-card:hover { border-color: var(--accent-border); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.profile-page .profile-post-card__img { aspect-ratio: 16 / 9; background: var(--photo); overflow: hidden; }
.profile-page .profile-post-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-page .profile-post-card__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.profile-page .profile-post-card__cat { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.profile-page .profile-post-card__title { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.profile-page .profile-post-card__meta { margin-top: auto; font-size: 12px; color: var(--ink-faint); }
.profile-page .profile-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.profile-page .profile-pagination-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--border-strong); padding: 9px 15px; border-radius: 11px; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.profile-page .profile-pagination-btn:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }
.profile-page .profile-pagination-btn svg { width: 15px; height: 15px; }
.profile-page .profile-pagination-info { font-size: 13.5px; font-weight: 600; color: var(--ink-faint); }

/* ===== comentarios recientes ===== */
.profile-page .profile-comments-list { list-style: none; margin: 0; padding: 0; }
.profile-page .profile-comments-list > li { border-bottom: 1px solid var(--border); }
.profile-page .profile-comments-list > li:last-child { border-bottom: none; }
.profile-page .profile-comment-item { display: block; padding: var(--space-3) 0; border: none; border-radius: 0; text-decoration: none; }
.profile-page .profile-comments-list > li:first-child .profile-comment-item { padding-top: 0; }
.profile-page .profile-comment-item:hover .profile-comment-item-body { color: var(--ink); }
.profile-page .profile-comment-item-post { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.profile-page .profile-comment-item-post svg { width: 13px; height: 13px; }
.profile-page .profile-comment-item-body { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.profile-page .profile-comment-item-date { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; }

/* ===== reseñas ===== */
.profile-page .profile-reviews-list { list-style: none; margin: 0; padding: 0; }
.profile-page .profile-review-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.profile-page .profile-review-item:first-child { padding-top: 0; }
.profile-page .profile-review-item:last-child { border-bottom: none; }
.profile-page .profile-review-item__header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-page .profile-review-item__product { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.profile-page .profile-review-item__stars { display: inline-flex; gap: 1px; }
.profile-page .profile-review-item__stars .star { width: 14px; height: 14px; }
.profile-page .profile-review-item__stars .star--full { fill: var(--star); }
.profile-page .profile-review-item__stars .star--empty { fill: var(--border-strong); }
.profile-page .profile-review-item__date { font-size: 12px; color: var(--ink-faint); margin-left: auto; }
.profile-page .profile-review-item__body { font-size: 13.5px; color: var(--ink-soft); margin-top: 7px; }
.profile-page .review-delete-btn { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-faint); background: none; border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.profile-page .review-delete-btn:hover { border-color: var(--danger); color: var(--danger); }


/* ===== MEDALLAS (rango + rejilla) ===== */
.medals { margin-bottom: 0; }
.medals__top {
  display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap;
  padding: var(--space-5) var(--space-6); border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-sm);
}
.medals__rank-ic { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.medals__rank-ic svg { width: 26px; height: 26px; }
.medals__rank-info { flex: 1; min-width: 200px; }
.medals__rank-label { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.medals__rank-name { font-family: var(--font-display); font-size: var(--fs-xl, 20px); font-weight: 800; color: var(--ink); margin-top: 1px; }
.medals__rank-bar { height: 7px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); margin-top: var(--space-2); overflow: hidden; }
.medals__rank-fill { height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.medals__rank-meta { font-size: var(--fs-xs); color: var(--ink-faint); margin-top: var(--space-2); }
.medals__rank-meta strong { color: var(--ink-soft); }
.medals__count { text-align: center; flex-shrink: 0; }
.medals__count b { display: block; font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.medals__count span { font-size: var(--fs-2xs); color: var(--ink-faint); }
.medals__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-4); }
.medal { position: relative; display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.medal--earned { border-color: var(--accent-border); background: var(--accent-soft); }
.medal__badge { width: 46px; height: 46px; border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); color: var(--ink-faint); }
.medal--earned .medal__badge { color: var(--accent); border-color: var(--accent-border); }
.medal__badge svg { width: 22px; height: 22px; }
.medal__body { min-width: 0; flex: 1; }
.medal__name { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.medal--locked .medal__name { color: var(--ink-soft); }
.medal__desc { font-size: var(--fs-2xs); color: var(--ink-faint); margin-top: 3px; line-height: 1.4; }
.medal__tag { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--space-2); font-size: var(--fs-2xs); font-weight: 700; color: var(--success); background: var(--success-soft); border: 1px solid var(--success-border); padding: 2px 8px; border-radius: var(--radius-pill); }
.medal__tag svg { width: 10px; height: 10px; }
.medal__prog { margin-top: var(--space-2); }
.medal__prog-bar { height: 5px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.medal__prog-fill { height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.medal__prog-txt { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-faint); margin-top: 5px; font-variant-numeric: tabular-nums; }
.medal__lock { position: absolute; top: var(--space-3); right: var(--space-3); color: var(--ink-faint); opacity: .45; }
.medal__lock svg { width: 14px; height: 14px; }

/* ===== responsive ===== */
@media (max-width: 900px) {
  .pf-hero__body { grid-template-columns: auto minmax(0, 1fr); }
  .pf-hero__actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; padding-top: 0; }
}
@media (max-width: 600px) {
  .pf-shell { padding: var(--space-4) var(--space-4) 0; }
  .pf-hero__band { height: 76px; padding-inline-end: var(--space-5); }
  .pf-hero__bars { width: 104px; height: 34px; }
  .pf-hero__body { grid-template-columns: 1fr; gap: var(--space-4); padding: 0 var(--space-5) var(--space-6); }
  .profile-page .pf-hero__avatar { width: 92px; height: 92px; margin-top: -46px; }
  .profile-page .profile-header-initials { font-size: 30px; }
  .pf-hero__main { padding-top: 0; }
  .pf-hero__name { font-size: 24px; }
  /* El separador se quedaba colgando al final de la línea al partirse. */
  .pf-hero__headline { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pf-hero__dot { display: none; }
  .pf-hero__stats { gap: var(--space-4); }
  .pf-hero__btns { width: 100%; }
  .pf-hero__btns .pf-btn { flex: 1; }
  .pf-block { padding: var(--space-5); }
  .pf-tab { padding: var(--space-3) var(--space-3); }
  .medals__grid { grid-template-columns: 1fr; }
  .medals__top { gap: var(--space-4); padding: var(--space-4); }
  .medals__count { display: none; }
  .medals__rank-info { min-width: 0; }
  .pf-join { padding: var(--space-5); }
  .pf-join__btns { width: 100%; }
  .pf-join__btns .pf-btn { flex: 1; }
}

@media (max-width: 560px) {
  /* Cuatro selectores en dos columnas dejan el mes sin ancho para su texto. */
  .profile-modal-row { grid-template-columns: minmax(0, 1fr); }
  .profile-modal { max-height: 92vh; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-tab::after { transition: none; }
  .pf-btn { transition: none; }
  .pf-btn:active { transform: none; }
}

/* ===== Modales / formularios — coherencia con tokens nuevos ===== */

/* --- caja del modal: cabecera y pie fijos, cuerpo con scroll propio, para
   que "Guardar" siga siendo alcanzable en pantallas bajas --- */
.profile-modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: min(88vh, 860px); display: flex; flex-direction: column; }
.profile-modal-header { border-bottom: 1px solid var(--border); flex-shrink: 0; }
.profile-modal-title { font-family: var(--font-display); color: var(--ink); }
.profile-modal-close { color: var(--ink-faint); border-radius: var(--radius-xs); }
.profile-modal-close:hover { color: var(--ink); background: var(--surface-2); }
/* El relleno inferior del formulario forma parte del área que hace scroll, así
   que con `bottom: 0` el último campo se colaba por debajo de la barra. Se le
   quita el relleno al formulario y se le da a la barra. */
.profile-modal-form { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-bottom: 0; }
.profile-modal-actions {
  position: sticky; bottom: 0; margin-top: auto;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-top: var(--space-4); padding-bottom: var(--space-6);
}
/* index.css fija aquí #fff sobre el acento con !important: en oscuro es 3.4:1. */
.profile-modal-actions .btn-primary,
.profile-modal-actions .btn-primary:hover {
  color: var(--accent-contrast) !important;
  border-color: transparent;
}
.profile-modal-actions .btn-primary { background-color: var(--accent) !important; }
.profile-modal-actions .btn-primary:hover { background-color: var(--accent-strong) !important; }

/* --- buscador de empresa / institución --- */
.company-search-field { border: none; background: none; padding: 0; gap: var(--space-2); }
.company-new-btn {
  display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto;
  padding: 0 var(--space-3); border-radius: var(--radius-btn);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border-strong);
}
.company-new-btn:hover { color: var(--accent); border-color: var(--accent-border); background: var(--surface-2); }

.company-suggestions { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; padding: var(--space-1); }
.company-suggestions::-webkit-scrollbar { width: 8px; }
.company-suggestions::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); border: 2px solid var(--surface); }
.company-suggestions::-webkit-scrollbar-track { background: transparent; }
.company-suggestion-item { border-radius: var(--radius-xs); gap: var(--space-3); }
.company-suggestion-item:hover { background: var(--accent-soft); color: var(--accent); }
.company-suggestion-logo { border-radius: var(--radius-xs); background: var(--surface-2); border: 1px solid var(--border); object-fit: contain; }
/* Fila de salida cuando la búsqueda no encuentra nada. */
.company-suggestion-item--new { color: var(--accent); font-weight: 600; }
.company-suggestion-plus { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--radius-xs); background: var(--accent-soft); border: 1px dashed var(--accent-border); font-weight: 700; line-height: 1; }

/* --- panel de creación: es un paso anidado, no otro formulario --- */
.company-creator {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
  padding: var(--space-4);
}
.company-creator-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); background: none; border: none; padding: 0; }
.company-creator-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.company-creator-title { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.company-creator-hint { font-size: var(--fs-2xs); color: var(--ink-faint); line-height: 1.45; }
.company-creator-close { flex-shrink: 0; color: var(--ink-faint); background: none; border: none; border-radius: var(--radius-xs); cursor: pointer; display: grid; place-items: center; width: 26px; height: 26px; }
.company-creator-close:hover { color: var(--ink); background: var(--surface); }

.company-logo-upload { display: flex; align-items: center; gap: var(--space-3); }
.company-logo-preview {
  width: 54px; height: 54px; flex-shrink: 0; overflow: hidden;
  border-radius: var(--radius-sm); border: 1px dashed var(--border-strong);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-faint);
}
.company-logo-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.profile-form-field .company-logo-label {
  display: inline-flex; align-items: center; padding: 7px 14px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-btn); cursor: pointer;
}
.profile-form-field .company-logo-label:hover { color: var(--accent); border-color: var(--accent-border); background: var(--surface-2); }
.company-logo-meta { font-size: var(--fs-2xs); color: var(--ink-faint); }
.company-logo-input { display: none; }

.company-creator-error { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); border-radius: var(--radius-xs); font-size: var(--fs-xs); padding: 8px 11px; margin-top: var(--space-3); }

/* Secundario: el primario del modal es "Guardar", y solo puede haber uno. */
.company-creator .btn-primary.company-creator-save {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; align-self: flex-start; margin-top: var(--space-2); padding: 8px 16px;
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--accent); background: var(--surface);
  border: 1px solid var(--accent-border); border-radius: var(--radius-btn);
  box-shadow: none; transform: none;
}
.company-creator .btn-primary.company-creator-save:hover { background: var(--accent); color: var(--accent-contrast); border-color: transparent; transform: none; }
.company-creator .btn-primary.company-creator-save:disabled { opacity: .55; cursor: not-allowed; }

/* --- campos --- */
.profile-form-field label { color: var(--ink-soft); }
.profile-form-field input, .profile-form-field textarea, .profile-form-field select, .mys-month, .mys-year, .company-search-field, #exp-company-input, #edu-institution-input { background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); border-radius: 10px; }
/* Selectores mes/año con chevron propio (sin la flecha nativa) */
.month-year-select { display: flex; gap: 8px; }
.month-year-select .mys-month, .month-year-select .mys-year, .profile-form-field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 10px 30px 10px 12px; font-family: inherit; font-size: 14px; color: var(--ink);
  line-height: 1.3; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8398' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 13px;
}
.month-year-select .mys-month { flex: 1 1 auto; min-width: 0; }
.month-year-select .mys-year { flex: 0 0 96px; }
.month-year-select .mys-month option, .month-year-select .mys-year option { background: var(--surface); color: var(--ink); }
.profile-form-field input:focus, .profile-form-field textarea:focus, .profile-form-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#exp-company-input, #edu-institution-input { flex: 1; min-width: 0; }
.req { color: var(--danger); }
.profile-form-optional { color: var(--ink-faint); }
.profile-form-cancel { color: var(--ink-soft); border: 1px solid var(--border-strong); border-radius: 10px; background: none; }
.profile-form-cancel:hover { border-color: var(--accent-border); color: var(--accent); }

/* ============================================================
   EDITAR PERFIL (rediseño)
   ============================================================ */
.profile-edit-page { background: var(--bg); padding: 0 0 70px; }
.profile-edit-page .edit { max-width: var(--container, 1200px); margin: 0 auto; padding: 28px 24px 0; }
.edit-head { margin-bottom: 22px; }
.edit-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-faint); margin-bottom: 12px; text-decoration: none; }
.edit-back:hover { color: var(--accent); }
.edit-back svg { width: 16px; height: 16px; }
.edit-head h1 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 800; color: var(--ink); }
.edit-head p { color: var(--ink-soft); font-size: 15px; margin-top: 6px; max-width: 620px; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.edit-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 26px; }
.edit-errors { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; font-size: 13.5px; color: var(--danger); }
.edit-errors p { margin: 2px 0; }

.profile-edit-page .field { margin-bottom: 22px; }
.profile-edit-page .field:last-of-type { margin-bottom: 0; }
.field__label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; }
.field__label svg { width: 15px; height: 15px; color: var(--ink-faint); }
.field__opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-faint); font-size: 12px; }
.profile-edit-page .field > input, .profile-edit-page .field > textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; font-family: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease; }
.profile-edit-page .field > input::placeholder, .profile-edit-page .field > textarea::placeholder { color: var(--ink-faint); }
.profile-edit-page .field > input:focus, .profile-edit-page .field > textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.profile-edit-page .field > textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.field__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; gap: 10px; }
.field__hint { font-size: 12px; color: var(--ink-faint); }
.field__count { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.field__count.is-warn { color: var(--warning); }
.field__err { display: block; margin-top: 6px; font-size: 12.5px; color: var(--danger); }

.inp-prefix { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease; }
.inp-prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp-prefix__ic { display: grid; place-items: center; width: 44px; color: var(--ink-faint); background: var(--surface-2); border-right: 1px solid var(--border); }
.inp-prefix__ic svg { width: 17px; height: 17px; }
.inp-prefix input { flex: 1; min-width: 0; border: none; background: none; padding: 12px 14px; font-family: inherit; font-size: 14.5px; color: var(--ink); }
.inp-prefix input:focus { outline: none; box-shadow: none; }

.av { display: flex; gap: 20px; align-items: center; padding: 20px; border: 1px dashed var(--accent-border); border-radius: 16px; background: var(--accent-soft); margin-bottom: 26px; }
.av__pic { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); display: grid; place-items: center; color: var(--accent-contrast); font-weight: 800; font-size: 26px; flex-shrink: 0; box-shadow: var(--shadow-sm); overflow: hidden; }
.av__pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av__main { min-width: 0; }
.av__btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--accent-border); border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--accent); background: var(--surface); cursor: pointer; transition: all .18s ease; }
.av__btn:hover { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.av__btn svg { width: 15px; height: 15px; }
.av__hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

.profile-edit-page .actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.profile-edit-page .btn { padding: 11px 22px; border-radius: 12px; font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; border: none; }
.profile-edit-page .btn--ghost { background: none; border: 1px solid var(--border-strong); color: var(--ink-soft); }
.profile-edit-page .btn--ghost:hover { border-color: var(--accent-border); color: var(--accent); }
.profile-edit-page .btn--primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-accent-sm); transition: transform .18s ease; }
.profile-edit-page .btn--primary:hover { transform: translateY(-1px); }

.edit-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
.edit-side .side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.edit-side .side-card__label { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); padding: 16px 18px 0; margin: 0; }
.mini { margin-top: 12px; }
.mini__cover { height: 64px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; padding-inline-end: 14px; }
.mini__bars { width: 62px; height: 22px; color: var(--accent); opacity: .16; }
.mini__bars rect { fill: currentColor; }
.mini__body { padding: 0 18px 18px; }
.mini__avatar { width: 62px; height: 62px; border-radius: 50%; border: 4px solid var(--surface); margin-top: -32px; background: var(--accent); display: grid; place-items: center; color: var(--accent-contrast); font-weight: 800; font-size: 21px; box-shadow: var(--shadow-sm); overflow: hidden; position: relative; }
.mini__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mini__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.mini__name svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.mini__user { font-size: 12.5px; color: var(--ink-faint); }
.mini__meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; font-weight: 600; }
.mini__meta:empty { display: none; }
.mini__bio { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }
.mini__social { display: flex; gap: 7px; margin-top: 12px; }
.mini__social span { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--ink-faint); }
.mini__social span svg { width: 14px; height: 14px; }
.mini__social span.off { opacity: .35; }
.tips { padding: 18px; }
.tips__title { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.tips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: flex; gap: 9px; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.tips li svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

@media (max-width: 900px) {
  .edit-grid { grid-template-columns: 1fr; }
  .edit-side { position: static; order: -1; }
}
@media (max-width: 600px) {
  .av { flex-direction: column; text-align: center; align-items: center; }
  .profile-edit-page .actions { flex-direction: column-reverse; }
  .profile-edit-page .btn { width: 100%; }
}

/* ============================================================
   SEGUIDORES / SIGUIENDO (rediseño)
   ============================================================ */
.follow-list-page { background: var(--bg); padding: 28px 24px 70px; }
.fl-shell { max-width: 720px; margin: 0 auto; }
.fl-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-faint); margin-bottom: 18px; text-decoration: none; }
.fl-back:hover { color: var(--accent); }
.fl-back svg { width: 16px; height: 16px; }
.fl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }

.fl-tabs { display: flex; border-bottom: 1px solid var(--border); }
.fl-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; font-size: 14.5px; font-weight: 600; color: var(--ink-faint); position: relative; cursor: pointer; text-decoration: none; transition: color .18s ease; }
.fl-tab:hover { color: var(--ink-soft); }
.fl-tab.is-active { color: var(--accent); }
.fl-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; transform: scaleX(0); transition: transform .2s ease; }
.fl-tab.is-active::after { transform: scaleX(1); }
.fl-tab__count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.fl-tab.is-active .fl-tab__count { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }

.fl-search { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.fl-search__box { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface-2); transition: border-color .18s ease, box-shadow .18s ease; }
.fl-search__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.fl-search__box svg { width: 17px; height: 17px; color: var(--ink-faint); flex-shrink: 0; }
.fl-search__box input { flex: 1; min-width: 0; border: none; background: none; font-family: inherit; font-size: 14px; color: var(--ink); }
.fl-search__box input:focus { outline: none; }
.fl-search__box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.fl-list { list-style: none; margin: 0; padding: 0; }
.fl-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background .15s ease; }
.fl-row:last-child { border-bottom: none; }
.fl-row:hover { background: var(--surface-2); }
.fl-avatar-link { flex-shrink: 0; display: block; }
.fl-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--accent); display: grid; place-items: center; color: var(--accent-contrast); font-weight: 700; font-size: 16px; }
.fl-info { flex: 1; min-width: 0; }
.fl-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 6px; text-decoration: none; }
.fl-name:hover { color: var(--accent); }
.fl-name svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.fl-name svg.vbadge--email { color: var(--success); }
.fl-user { display: block; font-size: 13px; color: var(--ink-faint); }
.fl-bio { font-size: 13px; color: var(--ink-soft); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.fl-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: none; background: var(--accent); color: var(--accent-contrast); font-family: inherit; transition: all .18s ease; }
.fl-btn:hover { box-shadow: var(--shadow-accent-sm); }
.fl-btn svg { width: 13px; height: 13px; }
.fl-btn.is-following { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--border-strong); }
.fl-btn.is-following:hover { border-color: var(--accent-border); color: var(--accent); box-shadow: none; }

.fl-empty { padding: 60px 24px; text-align: center; }
.fl-empty__ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-border); display: grid; place-items: center; color: var(--accent); margin: 0 auto 16px; }
.fl-empty__ic svg { width: 30px; height: 30px; }
.fl-empty p { color: var(--ink-soft); font-size: 14.5px; }

.fl-pag { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.fl-pag-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-decoration: none; }
.fl-pag-btn:hover { border-color: var(--accent-border); color: var(--accent); }
.fl-pag-btn svg { width: 15px; height: 15px; }
.fl-pag-info { font-size: 13px; color: var(--ink-faint); font-weight: 600; }

@media (max-width: 600px) {
  .follow-list-page { padding: 18px 14px 50px; }
  .fl-bio { display: none; }
  .fl-row { padding: 12px 14px; gap: 11px; }
  .fl-btn__txt { display: none; }
  .fl-btn { padding: 9px; }
  .fl-btn svg { width: 15px; height: 15px; }
}


/* ============================================================
   ELIMINAR CUENTA
   Página de confirmación: una columna, sin la maquetación del
   perfil que arrastraba antes.
   ============================================================ */
.da { background: var(--bg); padding: var(--space-12) var(--space-6) var(--space-16); }
.da__shell { max-width: 640px; margin: 0 auto; }
.da__back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-faint);
  text-decoration: none; margin-bottom: var(--space-5);
}
.da__back:hover { color: var(--accent); }
.da__back svg { width: 15px; height: 15px; }

.da__card {
  background: var(--surface);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-card);
  padding: var(--space-8);
}
.da__ic {
  display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid var(--danger-border);
  margin-bottom: var(--space-5);
}
.da__ic svg { width: 24px; height: 24px; }
.da__title { font-family: var(--font-display); font-size: var(--fs-xl, 24px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.da__lead { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--ink-soft); }

.da__list {
  list-style: none; margin: var(--space-6) 0 0; padding: 0;
  border-top: 1px solid var(--border);
}
.da__list li {
  position: relative;
  padding: var(--space-3) 0 var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5;
}
.da__list li::before {
  content: ""; position: absolute; left: var(--space-2); top: 1.05em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--danger);
}

.da__hint { margin-top: var(--space-5); font-size: var(--fs-xs); color: var(--ink-faint); line-height: 1.55; }
.da__hint a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent-border); }
.da__hint a:hover { border-bottom-color: var(--accent); }

/* Casilla de la newsletter en el borrado de cuenta. Misma anatomía que
   .auth-consent del registro, pero en la familia .da__ porque esta página no
   carga account/auth.css. Sin caja ni fondo: es una pregunta, no un aviso. */
.da__choice { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.da__choice label {
  display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer;
  font-size: var(--fs-xs); line-height: 1.55; color: var(--ink-soft);
}
.da__choice input[type="checkbox"] {
  flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0;
  accent-color: var(--accent); cursor: pointer;
}

.da__actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-7); }
.da__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: var(--radius-btn);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
/* El destructivo es el primario de esta página, pero sin sombra ni brillo:
   se confirma leyendo, no por inercia. */
.da__btn--danger { color: var(--danger-contrast); background: var(--danger); }
.da__btn--danger:hover { background: color-mix(in srgb, var(--danger) 84%, black); }
.da__btn--ghost { color: var(--ink-soft); background: none; border-color: var(--border-strong); }
.da__btn--ghost:hover { color: var(--ink); border-color: var(--ink-faint); }

@media (max-width: 560px) {
  .da { padding: var(--space-8) var(--space-4) var(--space-12); }
  .da__card { padding: var(--space-5); }
}
@media (prefers-reduced-motion: reduce) { .da__btn { transition: none; } }

/* Fila de la lista de personas: titular (o bio) recortado por líneas. */
.fl-role { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 3px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-sep { color: var(--ink-faint); font-weight: 400; }
.fl-bio { font-size: var(--fs-xs); color: var(--ink-faint); margin-top: 3px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* ============================================================
   RESCATADO DE users/index.css
   Las últimas reglas que solo vivían allí, migradas a los tokens
   del sistema. Con esto la hoja de 2.496 líneas deja de cargarse.
   ============================================================ */

/* Avatares */
.profile-community-avatar-link { flex-shrink: 0; text-decoration: none; }
.profile-community-avatar--initials {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast);
  font-size: var(--fs-2xs); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
/* El aro doble usaba #fff fijo: en oscuro dibujaba un halo blanco. */
.profile-header-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 100px; height: 100px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent);
}
.profile-header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Redes sociales y reseñas */
.profile-social-links { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.profile-review-delete-form { margin-top: var(--space-1); }

/* Línea de tiempo de experiencia */
.profile-timeline-item {
  display: flex; gap: var(--space-4);
  padding: var(--space-4) 0; border-bottom: 1px solid var(--border);
}
.profile-timeline-item:first-child { padding-top: 0; }
.profile-timeline-item:last-child { border-bottom: none; padding-bottom: 0; }
.profile-roles-list--multi .profile-timeline-item {
  flex-direction: column;   /* título y descripción apilados */
  gap: var(--space-2); padding: var(--space-3) 0; border-bottom: none;
}
.profile-roles-list--multi .profile-timeline-item + .profile-timeline-item { border-top: 1px dashed var(--border); }

/* Buscador de empresa / institución */
.company-search-wrap { position: relative; }
.company-selected-logo {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: var(--radius-xs); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
}
.company-selected-logo img { width: 100%; height: 100%; object-fit: contain; }
.company-suggestion-logo--empty { display: inline-block; }

/* Capa de los modales */
.profile-modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay, 400);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  background: rgb(0 0 0 / .55); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out);
}
.profile-modal-overlay.is-open { opacity: 1; pointer-events: all; }
.profile-modal-overlay.is-open .profile-modal { transform: translateY(0); }
.profile-modal-error {
  font-size: var(--fs-xs); font-weight: 500; color: var(--danger);
  padding: var(--space-2) var(--space-3);
  background: var(--danger-soft); border: 1px solid var(--danger-border);
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) { .profile-modal-overlay { transition: none; } }

/* ── Comunidad en la pestaña Actividad ───────────────────────────────────── */
.pf-cmy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.pf-cmy-item { padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.pf-cmy-item:last-child { border-bottom: 0; padding-bottom: 0; }

.pf-cmy-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.pf-cmy-q {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  line-height: var(--lh-snug); color: var(--ink);
}
.pf-cmy-link:hover .pf-cmy-q { color: var(--accent); }

/* La marca de mejor respuesta va sobre el título de la pregunta, no sobre el
   cuerpo: es lo que distingue una respuesta útil de un vistazo. */
.pf-cmy-best { display: inline-flex; flex: none; margin-top: 2px; color: var(--success); }
.pf-cmy-best svg { width: 13px; height: 13px; }

.pf-cmy-body { font-size: var(--fs-xs); line-height: var(--lh-relaxed); color: var(--ink-soft); }
.pf-cmy-n { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-faint); }
