/* MiEntidad.css — Panel "Mi Entidad" */
/* Usa variables de tema de ParaTodosLosPaneles.css */

#MiEntidad {
  padding: 12px 16px 80px;
  max-width: 600px;
  margin: 0 auto;
}

/* Header */
.ent-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.ent-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ce-surface);
  border: 2px solid var(--ce-border);
  cursor: pointer;
}
.ent-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--ce-surface);
  border: 2px dashed var(--ce-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
}
.ent-logo-wrap {
  position: relative;
  flex-shrink: 0;
}
.ent-logo-edit-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ce-accent, #38bdf8);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ce-bg, #0f172a);
  pointer-events: none;
}
.ent-header-info {
  flex: 1;
}
.ent-nombre {
  font-size: 18px;
  font-weight: 700;
  color: var(--ce-text);
}
.ent-tipo {
  font-size: 15px;
  color: var(--ce-text);
  opacity: .7;
  margin-top: 2px;
}
.ent-slug {
  font-size: 14px;
  color: var(--ce-accent2);
  margin-top: 2px;
}

/* Secciones */
.ent-section {
  background: var(--ce-surface);
  border: 1px solid var(--ce-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ent-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ce-text);
  text-transform: none;
  margin-bottom: 10px;
}

/* Campos editables */
.ent-field {
  margin-bottom: 12px;
}
.ent-field label {
  display: block;
  font-size: 14px;
  color: var(--ce-text);
  opacity: .75;
  margin-bottom: 4px;
}
.ent-field input,
.ent-field select {
  width: 100%;
  padding: 8px 10px;
  background: var(--ce-bg);
  border: 1px solid var(--ce-border);
  border-radius: 6px;
  color: var(--ce-text);
  font-size: 14px;
  outline: none;
}
.ent-field input:focus,
.ent-field select:focus,
.ent-field textarea:focus {
  border-color: var(--ce-accent);
}
.ent-field textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--ce-bg);
  border: 1px solid var(--ce-border);
  border-radius: 6px;
  color: var(--ce-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.ent-field textarea::placeholder {
  color: var(--ce-text);
  opacity: .45;
}
.ent-field select option {
  background: var(--ce-surface);
  color: var(--ce-text);
}

/* Botón guardar */
.ent-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--ce-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.ent-btn:hover {
  background: var(--ce-accent2);
}
.ent-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Miembros */
.ent-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ce-border);
}
.ent-member:last-child {
  border-bottom: none;
}
.ent-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ce-bg);
}
.ent-member-info {
  flex: 1;
}
.ent-member-name {
  font-size: 15px;
  color: var(--ce-text);
}
.ent-member-role {
  font-size: 14px;
  color: var(--ce-text);
  opacity: .65;
}

/* Pestañas Aprobado / Por aprobar */
.ent-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ce-border);
}
.ent-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--ce-surface);
  color: var(--ce-muted);
  border: none;
  transition: background .2s, color .2s;
}
.ent-tab--active {
  background: var(--ce-accent);
  color: #fff;
}
.ent-tab:not(.ent-tab--active):not(.ent-tab--disabled):hover {
  background: rgba(var(--ce-accent-rgb), .1);
}
.ent-tab--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Datos pendientes */
.ent-datos-pendientes {
  /* no opacity — los datos son editables en esta vista */
}
.ent-field-readonly {
  padding: 8px 10px;
  background: var(--ce-bg);
  border: 1px solid var(--ce-border);
  border-radius: 6px;
  color: var(--ce-text);
  font-size: 14px;
}
.ent-badge-cambio {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  margin-left: 8px;
  background: rgba(234,179,8,.15);
  color: rgb(161,98,7);
  border-radius: 10px;
  font-weight: 600;
}

/* Botón danger (eliminar) */
.ent-btn--danger {
  background: rgba(239,68,68,.12);
  color: rgb(239,68,68);
  border: 1px solid rgba(239,68,68,.25);
  padding: 3px 10px;
  font-size: 11px;
}
.ent-btn--danger:hover {
  background: rgba(239,68,68,.22);
}

/* Mensaje vacío */
.ent-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ce-text);
  opacity: .65;
  font-size: 15px;
}
.ent-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ── Admin Entidades ───────────────────────── */
.adment-card {
  background: var(--ce-surface);
  border: 1px solid var(--ce-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.adment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.adment-logo {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--ce-border);
  flex-shrink: 0;
}
.adment-logo-placeholder {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: var(--ce-bg);
  border: 2px dashed var(--ce-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.adment-info { flex: 1; }
.adment-cambios {
  background: var(--ce-bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.adment-cambio {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.adment-cambio:last-child { margin-bottom: 0; }
.adment-label {
  font-weight: 600; color: var(--ce-muted);
  min-width: 54px; font-size: 12px;
}
.adment-old { color: var(--ce-muted); text-decoration: line-through; }
.adment-arrow { color: var(--ce-muted); }
.adment-new { color: var(--ce-accent); font-weight: 600; }
.adment-actions {
  display: flex; gap: 8px;
}
.adment-btn-aprobar {
  flex: 1; padding: 10px;
  background: var(--ce-accent); color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.adment-btn-rechazar {
  flex: 1; padding: 10px;
  background: var(--ce-surface); color: #ef4444;
  border: 1px solid #ef4444; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
