/* H2D V99.53 · perfil profesional, contador de IA y centro de ayuda ampliado. */

.profile-account-card{
  padding:0 !important;
  overflow:hidden !important;
  border-radius:26px !important;
}
.profile-disclosure{width:100%}
.profile-disclosure-summary{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  cursor:pointer;
  list-style:none;
}
.profile-disclosure-summary::-webkit-details-marker{display:none}
.profile-disclosure-avatar{
  width:52px;
  height:52px;
  flex:0 0 52px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  color:#fff;
  font-weight:950;
  box-shadow:0 12px 26px rgba(37,99,235,.22);
}
.profile-disclosure-copy{min-width:0;flex:1}
.profile-disclosure-copy strong,
.profile-disclosure-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-disclosure-copy strong{font-size:18px;color:#0f172a}
.profile-disclosure-copy small{margin-top:4px;color:#64748b;font-size:13px}
.profile-disclosure-action{
  display:flex;
  align-items:center;
  gap:8px;
  color:#334155;
  font-size:12px;
  font-weight:900;
}
.profile-disclosure-chevron{font-size:20px;transition:transform .2s ease}
.profile-disclosure[open] .profile-disclosure-chevron{transform:rotate(180deg)}
.profile-disclosure-body{
  padding:20px;
  border-top:1px solid #e2e8f0;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(248,250,252,.78));
}
.profile-account-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,330px);
  gap:18px;
  align-items:start;
}
.profile-account-main{min-width:0}
.profile-professional-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:0 0 16px;
}
.profile-kicker{
  color:#2563eb;
  font-size:11px;
  font-weight:950;
  letter-spacing:.1em;
}
.profile-professional-head h3{margin:5px 0 3px;color:#0f172a;font-size:26px;line-height:1.05}
.profile-professional-head p{margin:0;color:#64748b;font-size:15px}
.profile-professional-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.profile-info-card{
  min-width:0;
  padding:16px;
  border:1px solid #dbe3ee;
  border-radius:18px;
  background:rgba(248,250,252,.92);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}
.profile-info-card span,
.profile-info-card small{display:block;color:#64748b;font-size:12px}
.profile-info-card strong{
  display:block;
  margin:6px 0;
  color:#0f172a;
  font-size:16px;
  overflow-wrap:anywhere;
}
.profile-module-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.profile-module-chip{
  padding:5px 9px;
  border-radius:999px;
  background:#e0e7ff;
  color:#3730a3;
  font-size:11px;
  font-weight:850;
}
.profile-access-summary{margin-top:12px}
.profile-actions-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.profile-actions-row button{width:100%;min-width:0;min-height:52px}
.profile-side-panel{display:grid;gap:12px}
.profile-side-card,
.profile-help-card-btn{
  width:100%;
  border:1px solid #dbe3ee;
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 26px rgba(15,23,42,.055),inset 0 1px 0 rgba(255,255,255,.9);
}
.profile-side-card{padding:16px}
.profile-side-eyebrow{
  display:block;
  margin-bottom:8px;
  color:#64748b;
  font-size:10px;
  font-weight:950;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.profile-account-status-card{
  background:linear-gradient(135deg,#f8fafc,#f1f5f9);
}
.profile-status-cluster{display:flex;gap:7px;flex-wrap:wrap}
.profile-status-chip{
  padding:7px 10px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  font-size:11px;
  font-weight:900;
}
.profile-status-chip.active{background:#ecfdf5;color:#047857}
.profile-status-chip.inactive{background:#fff1f2;color:#be123c}
.profile-account-status-card p{
  margin:10px 0 0;
  color:#52637d;
  font-size:12px;
  line-height:1.5;
}
.profile-ai-card{
  background:
    radial-gradient(circle at 100% 0%,rgba(14,165,233,.12),transparent 42%),
    linear-gradient(135deg,#f8fbff,#f0fdfa);
}
.ai-usage-head{display:flex;align-items:center;gap:11px}
.ai-usage-icon{
  width:40px;
  height:40px;
  flex:0 0 40px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg,#dbeafe,#ccfbf1);
  color:#075985;
  font-size:13px;
  font-weight:950;
  box-shadow:inset 0 0 0 1px rgba(14,165,233,.14);
}
.ai-usage-icon.h2d-ai-mark{padding:2px;overflow:hidden;background:#fff;box-shadow:0 8px 18px rgba(15,43,91,.10),inset 0 0 0 1px rgba(14,165,233,.18)}
.ai-usage-icon.h2d-ai-mark img{display:block;width:100%;height:100%;object-fit:cover;border-radius:11px}
.profile-ai-card.is-disabled .ai-usage-icon.h2d-ai-mark img,.help-ai-summary.is-disabled .ai-usage-icon.h2d-ai-mark img{filter:grayscale(1);opacity:.7}
.ai-usage-head .profile-side-eyebrow{margin:0 0 3px}
.ai-usage-head strong{display:block;color:#0f172a;font-size:15px}
.ai-usage-value{margin-top:14px;color:#0f172a;font-size:22px;font-weight:950;letter-spacing:-.025em}
.ai-usage-detail{margin-top:3px;color:#52637d;font-size:12px;line-height:1.4}
.ai-usage-progress{
  height:7px;
  margin-top:12px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(148,163,184,.22);
}
.ai-usage-progress span{
  display:block;
  width:12%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#0ea5e9,#14b8a6);
  transition:width .3s ease;
}
.profile-ai-card small,
.help-ai-summary small{display:block;margin-top:8px;color:#64748b;font-size:11px;line-height:1.45}
.profile-ai-card.is-unlimited .ai-usage-progress span,
.help-ai-summary.is-unlimited .ai-usage-progress span{background:linear-gradient(90deg,#2563eb,#7c3aed)}
.profile-ai-card.is-disabled,
.help-ai-summary.is-disabled{background:linear-gradient(135deg,#fff7ed,#fff1f2)}
.profile-ai-card.is-disabled .ai-usage-icon,
.help-ai-summary.is-disabled .ai-usage-icon{background:#ffe4e6;color:#be123c}
.profile-ai-card.is-disabled .ai-usage-progress span,
.help-ai-summary.is-disabled .ai-usage-progress span{background:#f43f5e}
.profile-ai-card.is-cached .ai-usage-detail::after,
.help-ai-summary.is-cached .ai-usage-detail::after{content:' · dato guardado';color:#9a3412}
.home .profile-help-card-btn[data-open-help]{display:grid !important}
.profile-help-card-btn{
  position:static !important;
  min-width:0 !important;
  min-height:76px !important;
  padding:14px 15px !important;
  display:grid !important;
  grid-template-columns:42px 1fr auto !important;
  gap:12px !important;
  align-items:center !important;
  text-align:left !important;
  cursor:pointer !important;
  color:#0f172a !important;
  background:linear-gradient(135deg,#fff,#f8fafc) !important;
}
.profile-help-card-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.24);
  box-shadow:0 15px 34px rgba(15,23,42,.09);
}
.profile-help-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg,#e0f2fe,#fef9c3);
  color:#075985;
  font-size:17px;
  font-weight:950;
  box-shadow:inset 0 0 0 1px rgba(14,165,233,.14);
}
.profile-help-copy{min-width:0}
.profile-help-copy strong,.profile-help-copy small{display:block}
.profile-help-copy strong{font-size:15px;color:#0f172a}
.profile-help-copy small{margin-top:3px;color:#64748b;font-size:11px;line-height:1.35}
.profile-help-arrow{color:#2563eb;font-size:20px;font-weight:950}

/* El botón flotante antiguo solo se mantiene en la pantalla pública. */
.home:not(.home-public) .profile-help-card-btn{position:static !important;inset:auto !important}

/* Centro de ayuda V99.53 */
#helpModal .help-card{
  width:min(1120px,100%) !important;
  padding:30px !important;
}
#helpModal .help-modal-close{
  position:sticky;
  top:0;
  z-index:5;
  float:right;
  width:44px;
  height:44px;
  margin:-4px -4px 0 14px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  color:#334155;
  font-size:24px;
  line-height:1;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
  backdrop-filter:blur(8px);
}
#helpModal .help-modal-close:hover{color:#0f172a;border-color:rgba(37,99,235,.25);transform:translateY(-1px)}
#helpModal .help-subtitle{max-width:850px !important;margin-bottom:18px !important}
#helpModal .help-intro-note{
  margin:0 0 18px;
  padding:13px 15px;
  border:1px solid rgba(14,165,233,.18);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(239,246,255,.9),rgba(240,253,250,.9));
  color:#35506e;
  font-size:13px;
  line-height:1.55;
}
#helpModal .help-section-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin:24px 0 10px;
}
#helpModal .help-section-heading:first-child{margin-top:4px}
#helpModal .help-section-heading div{min-width:0}
#helpModal .help-section-kicker{
  display:block;
  margin-bottom:4px;
  color:#2563eb;
  font-size:10px;
  font-weight:950;
  letter-spacing:.11em;
  text-transform:uppercase;
}
#helpModal .help-section-heading h4{
  margin:0 !important;
  color:#0f172a;
  font-size:20px !important;
  line-height:1.15;
  font-weight:950;
}
#helpModal .help-section-heading p{
  margin:0;
  max-width:620px;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
  text-align:right;
}
#helpModal .help-grid{grid-template-columns:repeat(auto-fit,minmax(245px,1fr)) !important;gap:12px !important;margin-top:0 !important}
#helpModal .help-block,
#helpModal .faq-item{
  position:relative;
  min-height:100%;
  padding:18px !important;
  border-radius:20px !important;
}
#helpModal .help-block-icon{
  width:34px;
  height:34px;
  margin-bottom:12px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:950;
}
#helpModal .help-block.ai .help-block-icon{background:#ecfdf5;color:#047857}
#helpModal .help-block.account .help-block-icon{background:#f5f3ff;color:#6d28d9}
#helpModal .help-block.support .help-block-icon{background:#fff7ed;color:#c2410c}
#helpModal .help-block h4,
#helpModal .faq-item h4{font-size:15px !important;margin-bottom:7px !important}
#helpModal .help-block p,
#helpModal .faq-item p{font-size:13px !important;line-height:1.55 !important}
#helpModal .help-list{
  margin:10px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:7px;
}
#helpModal .help-list li{
  position:relative;
  padding-left:17px;
  color:#52637d;
  font-size:12px;
  line-height:1.45;
}
#helpModal .help-list li::before{
  content:'✓';
  position:absolute;
  left:0;
  top:0;
  color:#0f766e;
  font-weight:950;
}
#helpModal .help-ai-summary{
  display:grid;
  grid-template-columns:minmax(220px,.8fr) minmax(280px,1.2fr);
  gap:18px;
  align-items:center;
  margin:0 0 18px;
  padding:18px 20px;
  border:1px solid rgba(14,165,233,.2);
  border-radius:22px;
  background:
    radial-gradient(circle at 100% 0%,rgba(255,204,0,.12),transparent 35%),
    radial-gradient(circle at 0 100%,rgba(14,165,233,.12),transparent 38%),
    linear-gradient(135deg,#f8fbff,#f0fdfa);
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}
#helpModal .help-ai-summary .ai-usage-value{margin-top:10px;font-size:22px}
#helpModal .help-ai-explanation{
  padding-left:18px;
  border-left:1px solid rgba(148,163,184,.28);
}
#helpModal .help-ai-explanation strong{display:block;color:#0f172a;font-size:14px}
#helpModal .help-ai-explanation p{margin:6px 0 0;color:#52637d;font-size:12px;line-height:1.55}
#helpModal .help-warning{
  margin-top:14px;
  padding:14px 16px;
  border:1px solid #fed7aa;
  border-radius:17px;
  background:#fff7ed;
  color:#7c2d12;
  font-size:12px;
  line-height:1.55;
}
#helpModal .help-warning strong{color:#9a3412}
#helpModal .help-close-row{position:sticky;bottom:-30px;z-index:4;margin:26px -30px -30px !important;padding:16px 30px 22px !important;background:linear-gradient(180deg,rgba(248,250,252,.30),rgba(248,250,252,.98) 28%);backdrop-filter:blur(7px)}

@media(max-width:980px){
  .profile-account-layout{grid-template-columns:1fr}
  .profile-side-panel{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profile-side-card,.profile-help-card-btn{min-height:100%}
}
@media(max-width:760px){
  .profile-disclosure-body{padding:16px}
  .profile-disclosure-summary{align-items:flex-start}
  .profile-disclosure-action>span:first-child{display:none}
  .profile-professional-grid,.profile-actions-row{grid-template-columns:1fr}
  .profile-side-panel{grid-template-columns:1fr}
  #helpModal .help-ai-summary{grid-template-columns:1fr}
  #helpModal .help-ai-explanation{padding-left:0;padding-top:14px;border-left:0;border-top:1px solid rgba(148,163,184,.28)}
  #helpModal .help-section-heading{display:block}
  #helpModal .help-section-heading p{margin-top:5px;text-align:left}
}
@media(max-width:680px){
  #helpModal .help-card{padding:20px !important}
  #helpModal .help-modal-close{margin:-2px -2px 0 10px}
  #helpModal .help-close-row{bottom:-20px;margin:24px -20px -20px !important;padding:14px 20px 20px !important}
  #helpModal .help-grid{grid-template-columns:1fr !important}
}

/* La guía antigua ocultaba siempre Administración. En dashboard solo se muestra si el HTML la renderiza (usuario admin). */
.home-dashboard #helpModal .help-tab[data-help-tab="admin"]{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
